Skip to content

Automated install tests #226

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

Open
wants to merge 42 commits into
base: master
Choose a base branch
from
Open

Automated install tests #226

wants to merge 42 commits into from

Conversation

ydirson
Copy link
Contributor

@ydirson ydirson commented May 14, 2024

@ydirson
Copy link
Contributor Author

ydirson commented May 15, 2024

Current status: install + firstboot work in a single test
Next:

  • xva export/import, split firstboot in separate test
  • include answerfile in install.img
  • answerfile generation

@ydirson ydirson force-pushed the install branch 3 times, most recently from 13282cc to 64d0e9c Compare May 23, 2024 08:16
@ydirson
Copy link
Contributor Author

ydirson commented May 23, 2024

Current status: 2 separate tests for install and firstboot work without any manual intervention
Next steps:

  • use VM cache to gain time
  • write reinstall test
  • parametrize ISO remaster
  • write upgrade test

@ydirson ydirson force-pushed the install branch 4 times, most recently from 143c991 to 56abc4e Compare May 28, 2024 13:38
@ydirson
Copy link
Contributor Author

ydirson commented May 28, 2024

Current status:

  • 3 separate tests for install, firstboot, "reinstall upgrade"
  • test dependencies declared (requires pytest-dependency, best used with pytest-order)
  • includes pytest_collection_modifyitems hook to automatically run the dependencies first

Next steps:

  • write a hook to not rerun dependencies whose output is in the vm cache, starting with Add support for a hook to override skip decision. RKrahl/pytest-dependency#77
  • start adding (explicit) parameters on tests
  • likely postoned
    • fix pytest_collection_modifyitems hook to properly register additional tests (some fixtures are missing)
    • improve hook to deal with test parameters
    • improve hook further by not ignoring dependents of tests explicitly requested (so in a->b->c->d chain with cached VMs pytest b d will also run c

@ydirson ydirson force-pushed the install branch 4 times, most recently from 1fda4a1 to 2dd8ec0 Compare June 14, 2024 08:04
@ydirson
Copy link
Contributor Author

ydirson commented Jun 14, 2024

Current status:

  • cached VM descriptions now much less verbose, fitting in XO display
  • pytest_collection_modifyitems hook for auto-registring dependencies was moved out of scope, will be a later PR
  • start including some tests of the fixtures themselves
  • improvements to test parametrization well under way:
    • started to make fixtures more versatile, with ability to use callables taking test parameters, leading to less duplication
    • ... but bad interaction with pytest-order, to be investigated

Next steps:

  • deal with the regression on dependency ordering - may not be trivial or even doable
  • finish adding uefi/bios "firmware" parameter
  • add iso/net "package source" parameter
  • add ability to upgrade from XS
  • add ability to upgrade from 8.0-8.1 to 8.3
  • add ability to upgrade from 7.5-7.6 to 8.3
  • add "restore" test following "upgrade"

@ydirson ydirson force-pushed the install branch 3 times, most recently from b75d3ed to ebe6700 Compare June 19, 2024 16:03
@ydirson ydirson force-pushed the install branch 4 times, most recently from 358055b to 18e0ef8 Compare June 25, 2024 15:14
ydirson and others added 28 commits March 26, 2025 13:30
This protects against using results from incompatible test by mistake.

Signed-off-by: Yann Dirson <[email protected]>
The key used to locate a VM image in the VM cache depends on the test repo
commit hash, to protect against using results from incompatible test by
mistake.  But the commit hash can change for many reasons that do not
influence the parent tests, so this provides a way to use known-equivalent
test outputs.

Signed-off-by: Yann Dirson <[email protected]>
This will avoid duplication of logic for selecting parent test.

Since dependencies are now generated by fixtures, they are not taken
into account by pytest-order any more.  Looks like some heavy surgery
would be necessary to get that back.

Signed-off-by: Yann Dirson <[email protected]>
Especially useful for images out of CI, which today are not signed yet.

Signed-off-by: Yann Dirson <[email protected]>
Changing test parameters may require changes to hardcoded test sequences.

Adding only a single test sequence here to server as example for quick
testing, as further commits will make many changes to test names.

Signed-off-by: Yann Dirson <[email protected]>
Signed-off-by: Yann Dirson <[email protected]>
Signed-off-by: Yann Dirson <[email protected]>
No direct upgrade to 8.3 for those versions.

Signed-off-by: Yann Dirson <[email protected]>
This is just base infra, different machines have not differences yet.

Signed-off-by: Yann Dirson <[email protected]>
Uses a helper VM to modify firstboot data in installed disk

Signed-off-by: Yann Dirson <[email protected]>
clone+start:// will be used to implement--hosts=cache://...

clone:// itself is not yet used directly, but as the "base" protocol upon
which clone+start build, it seems logical (and basically free) to implement.

Signed-off-by: Yann Dirson <[email protected]>
Will allow it to access host_list through closure.

Signed-off-by: Yann Dirson <[email protected]>
Special care taken for making sure a created VM is destroyed if
setup_host fails further down the line.

Signed-off-by: Yann Dirson <[email protected]>
Add a new parameter to allow booting using netinstall. If an ISO only
supports netinstall, it is specified it in the data.py by setting the
`net-only`option to True. This option is set to False by default.

Signed-off-by: Guillaume <[email protected]>
Signed-off-by: Yann Dirson <[email protected]>
Signed-off-by: Yann Dirson <[email protected]>
In some network we might not even have a PXE server, or no ssh access to
it.

Signed-off-by: Yann Dirson <[email protected]>
The former code relies on output from the net-tools implementation of
the arp tool.  At least the busybox implementation, found in Alpine
Linux, has a different output.

The `ip neigh` OTOH is designed as machine-readable and works both
with iproute2 and busybox.

Signed-off-by: Yann Dirson <[email protected]>
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.

6 participants