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

test: add container installer test #109

Merged
merged 3 commits into from
Jan 25, 2024
Merged

Conversation

mvo5
Copy link
Collaborator

@mvo5 mvo5 commented Jan 11, 2024

Add a new integration test that checks that the container installer
is working. The contaner installer just does an unattended install
of a disk. The test will run qemu with the installer.iso and an
empty disk. Once a reboot from the ISO is detected (via QMP) qemu
exists and boots the test disk and checks that it boots and the
test user can login.

@mvo5 mvo5 force-pushed the container-installer-test branch 3 times, most recently from f6126f3 to 3584bd6 Compare January 11, 2024 18:43
test/test_smoke.py Outdated Show resolved Hide resolved
test/vm.py Show resolved Hide resolved
@mvo5 mvo5 force-pushed the container-installer-test branch 6 times, most recently from 00215c5 to 4a74bfc Compare January 17, 2024 20:28
@mvo5 mvo5 marked this pull request as ready for review January 17, 2024 20:28
@mvo5 mvo5 requested a review from supakeen January 17, 2024 20:28
@mvo5
Copy link
Collaborator Author

mvo5 commented Jan 18, 2024

The testing farm tests fail with "no space left on device" :/

test/vm.py Outdated Show resolved Hide resolved
@bcl
Copy link
Contributor

bcl commented Jan 18, 2024

It looks like SUPPORTED_IMAGE_TYPES is no longer the list that drives all the test loops. I was a bit confused by the artifact test change until I realized that you have a separate test for iso that isn't in the list. Maybe it needs a new name, or a comment?

@mvo5
Copy link
Collaborator Author

mvo5 commented Jan 19, 2024

It looks like SUPPORTED_IMAGE_TYPES is no longer the list that drives all the test loops. I was a bit confused by the artifact test change until I realized that you have a separate test for iso that isn't in the list. Maybe it needs a new name, or a comment?

Thanks, that is a nice catch and a good point. I renamed the vars a bit to (hopefully) make it more clear. Ideas/comments welcome!

bcl
bcl previously approved these changes Jan 19, 2024
Copy link
Contributor

@bcl bcl left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks!

@mvo5 mvo5 added this pull request to the merge queue Jan 22, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Jan 22, 2024
@mvo5 mvo5 enabled auto-merge January 24, 2024 07:33
@mvo5
Copy link
Collaborator Author

mvo5 commented Jan 25, 2024

It looks like the test is currently failing because of an anaconda error?
Screenshot from 2024-01-25 10-28-39

[edit: I tried this multiple times now and the exact crash differs, I also saw gnome-kiosk exited on signal11 in slightly different places, e.g. anaconda.intf.setup(kfsdata)]

[edit2: this is bug https://github.com/fedora-eln/eln/issues/177]

Add a new integration test that checks that the container installer
is working. The contaner installer just does an unattended install
of a disk. The test will run qemu with the installer.iso and an
empty disk. Once a reboot from the ISO is detected (via QMP) qemu
exists and boots the test disk and checks that it boots and the
test user can login.
When running tests locally it can be useful to have a full qemu
gui. E.g. the install test is not putting anything on the serial
port AFAICT. So the new environment `OSBUILD_TEST_QEMU_GUI=1` will
bring up a graphical qemu during the tests.

Use as e.g.
```
$ sudo OSBUILD_TEST_QEMU_GUI=1 pytest -s -vv -rs './test/test_build.py::test_iso_installs[iso]'
```
There is a regression in ELN that prevents the installer from
working [0]. To prevent this and in general provide more
stability move to pinned fedora-eln sources.

[0] fedora-eln/eln#177
Copy link
Member

@achilleas-k achilleas-k left a comment

Choose a reason for hiding this comment

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

Splendid. LGTM!

@mvo5 mvo5 added this pull request to the merge queue Jan 25, 2024
Merged via the queue into osbuild:main with commit fd8ee3f Jan 25, 2024
8 of 10 checks passed
@mvo5 mvo5 deleted the container-installer-test branch January 25, 2024 18:24
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.

None yet

5 participants