Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add validation for additionalDisks #3115

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

olamilekan000
Copy link
Contributor

@olamilekan000 olamilekan000 commented Jan 14, 2025

change validation to ensure that only Disk type values are allowed in the AdditionalDisks field.

Fixes #3071

@alexandear
Copy link
Member

Please edit the title and description:

  • Change the title from "change adds validation for AdditionalDisks" to "Add validation for additionalDisks"
  • The PR's description should include Fixes #3071 so that GitHub automatically closes the issue upon the PR's merge.

pkg/limayaml/validate.go Outdated Show resolved Hide resolved
@olamilekan000 olamilekan000 changed the title change adds validation for AdditionalDisks Add validation for additionalDisks Jan 14, 2025
@olamilekan000 olamilekan000 force-pushed the validate-additional-disk branch from f3775f9 to 8e5208d Compare January 14, 2025 12:40
pkg/limayaml/validate.go Outdated Show resolved Hide resolved
@olamilekan000 olamilekan000 force-pushed the validate-additional-disk branch from 8e5208d to fba79bf Compare January 14, 2025 18:01
Copy link
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure the test needs to be updated to match.

You should also consider adding a test case for an invalid, but non-empty name, to verify it also throws an error.

pkg/limayaml/validate_test.go Show resolved Hide resolved
pkg/limayaml/validate_test.go Show resolved Hide resolved
Copy link
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I was wrong, the test is fine as-is.

Adding a non-empty invalid name might make sense, but otherwise this PR looks fine, thank you!

@jandubois jandubois merged commit ae88c50 into lima-vm:master Jan 14, 2025
29 checks passed
@AkihiroSuda AkihiroSuda added this to the v1.1.0 (tentative) milestone Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

There is no validation for additionalDisks
4 participants