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

added file cleanup for multihost tests #765

Merged

Conversation

engelmi
Copy link
Member

@engelmi engelmi commented Feb 28, 2024

Relates to: #662

In order to run all tests on a set of provisioned hosts, the state of the host needs to be restored after each test run. This includes:

  • removing all added files
  • restoring all changed files
  • stopping all systemd units and reset failed ones (incl. bluechi)

By keeping track of these operations, the test class is able to execute respective cleanup tasks on the hosts. Therefore, the cleanup from machine class has been moved to the ssh test class. The container test class still only removes the created containers.

Also, added a tag on the root main.fmf to mark all tests by default to be able to run in a multihost setting. Certain tests that exceed the available number of hosts (>3) are disabled for now. And fixed/improved some of the integration tests.


Testing this change:

In order to test this on testing farm (GH CI with containers is automatic), a dedicated branch has been created:
https://github.com/engelmi/bluechi/tree/added-cleanup-to-integration-test-experiment
It changes the plan tier0.fmf to use a multihost setup and filters only for tests with the tag: multihost - which is set for all tests except some few that exceed the maximum number of nodes (>3).

Request to start on testing farm: (an exported API token is required)

testing-farm request --path tests --git-ref added-cleanup-to-integration-test-experiment --git-url https://github.com/engelmi/bluechi.git --compose Fedora-Rawhide --pipeline-type tmt-multihost

And here are the results:
http://artifacts.osci.redhat.com/testing-farm/57eb8333-a3d6-4239-8df8-fce66840f4ad/

@coveralls
Copy link

coveralls commented Feb 28, 2024

Coverage Status

coverage: 75.879% (-2.0%) from 77.905%
when pulling 7075439 on engelmi:added-cleanup-to-integration-tests
into e0c123d on eclipse-bluechi:main.

@engelmi engelmi force-pushed the added-cleanup-to-integration-tests branch 4 times, most recently from a18550a to b66390a Compare March 1, 2024 13:40
Copy link
Member

@mwperina mwperina left a comment

Choose a reason for hiding this comment

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

Generally it looks good

tests/bluechi_test/machine.py Show resolved Hide resolved
Relates to: eclipse-bluechi#662

Added a tag on the root main.fmf to mark all tests by default to
be able to run in a multihost setting. Certain tests that exceed
the available number of hosts (>3) are disabled for now.

Signed-off-by: Michael Engel <[email protected]>
Relates to: eclipse-bluechi#662

In order to run all tests on a set of provisioned hosts, the state
of the host needs to be restored after each test run.
This includes:
- removing all added files
- restoring all changed files
- stopping all systemd units and reset failed ones (incl. bluechi)

By keeping track of these operations, the test class is able to
execute respective cleanup tasks on the hosts. Therefore, the
cleanup from machine class has been moved to the ssh test class.
The container test class still only removes the created containers.

Signed-off-by: Michael Engel <[email protected]>
Signed-off-by: Michael Engel <[email protected]>
@engelmi engelmi force-pushed the added-cleanup-to-integration-tests branch from b66390a to 7075439 Compare March 1, 2024 15:47
@engelmi engelmi merged commit 04a9723 into eclipse-bluechi:main Mar 4, 2024
20 checks passed
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.

3 participants