-
Notifications
You must be signed in to change notification settings - Fork 97
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 simple UKI test #1619
🤖 Add simple UKI test #1619
Conversation
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
stateContains(vm, "system.os.name", "alpine", "opensuse", "ubuntu", "debian", "fedora") | ||
stateContains(vm, "kairos.flavor", "alpine", "opensuse", "ubuntu", "debian", "fedora") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how come we need to have here all the different flavors?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a generic test that check that is indeed on of the flavors of the lost so if we change or add extra flavors for the test in the future it doesn't need a test change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gotcha, I guess ideally we should pass it via an env var or pick it from the uki file name or something like that, but can be improved later on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, this was mainly copied fromt he existing acceptance test. Its kind of generic and could be more specific.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
}, | ||
// UKI boot | ||
func(m *types.MachineConfig) error { | ||
drive := os.Getenv("UKI_DRIVE") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late comment. I think the test below can easily turn to false positive if one omits these 2 environment variables. A quick solution would be to check in the test that these 2 environment variables are set (like we do for CONTAINER_IMAGE
in the upgrade test)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, I dont think so. If we do not set up this drive and only the iso, it will probably boot from the iso but the first test will fail as it wont detect that it has booted in UKI mode.
So no matter iof you skip this, your UKI test wont pass if you boot from anything but a UKI artifact.
But I agree, a check in there with a decent failure message before starting the VM would be much nicer
Signed-off-by: Itxaka itxaka.garcia@spectrocloud.com
What this PR does / why we need it:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #