-
Notifications
You must be signed in to change notification settings - Fork 12
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
Update upgrade test #846
Update upgrade test #846
Conversation
d31be19
to
3f6fbd4
Compare
13c34cf
to
ac86a74
Compare
ac86a74
to
d81a2c2
Compare
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.
Awesome work! Great to finally be able to include this in the suite 👏 👏
|
||
with test.step("Verify the boot order is the orignal configured"): | ||
# Wait for sshd to start. | ||
until(lambda: old_bootorder == bootloader.get_boot_order(), attempts=200) |
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.
until(lambda: old_bootorder == bootloader.get_boot_order(), attempts=200) | |
order = bootloader.get_boot_order() | |
assert order == old_bootorder, f"Unexpected bootorder: {repr(order)}" |
until
seems counter intuitive here, since the boot order is not a volatile thing. Do we need more assurances from the SSH connection? Should we add a long -oConnectTimeout 300
or something?
Also, if this ever happens, I think we want to know which state we're leaving the system in
|
||
def set_boot_order(self, order): | ||
return self.ssh.run(f"sudo grub-editenv /mnt/aux/grub/grubenv set ORDER='{order}'".split()).returncode | ||
|
||
with infamy.Test() as 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.
We might want to add some way for a test implementation to register cleanup functions. Such that the boot order is restored even if we break the test in the middle (e.g., pressing C-c
)
8c66b8c
to
85a3d5d
Compare
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.
🚢 it!
e32ba34
to
47c5492
Compare
Nice work, only some squash and rebase left to do! 😎 👍 |
Works on both virtual and physical target
2bfe606
to
f023304
Compare
Description
Checklist
Tick relevant boxes, this PR is-a or has-a: