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

Move image caching from Zuul playbook #751

Closed
HarryMichal opened this issue Apr 8, 2021 · 0 comments · Fixed by #774
Closed

Move image caching from Zuul playbook #751

HarryMichal opened this issue Apr 8, 2021 · 0 comments · Fixed by #774
Labels
1. Feature request A request for a new feature 2. CI Automation of testing, analysis and other actions 2. Testing Related to testing of Toolbox - unit, system,..
Milestone

Comments

@HarryMichal
Copy link
Member

HarryMichal commented Apr 8, 2021

Is your feature request related to a problem? Please describe.

Since #517 we have a mechanism for caching OCI images for greater CI reliability. This mechanism is part of the CI configuration and thus can not be utilized in e.g. Toolbox's rpm subpackage -tests because there's no script to package. This makes the package useless because the helper functions in system tests for pulling images rely on this mechanism being online.

Describe the solution you'd like

Extract the image caching mechanism pro Zuul Ansible playbook into a script. Call the script in the CI instead.

Additional context

Greater usability/reliability of the tests means higher chance of having the tests used somewhere (e.g., containers/podman#10296).

@HarryMichal HarryMichal added 1. Feature request A request for a new feature 2. CI Automation of testing, analysis and other actions 2. Testing Related to testing of Toolbox - unit, system,.. labels Apr 8, 2021
@HarryMichal HarryMichal added this to the Release 0.1.0 milestone May 24, 2021
debarshiray added a commit to debarshiray/toolbox that referenced this issue Jun 21, 2023
The 000-setup.bats and 999-teardown.bats files were added [1] at a time
when Bats didn't offer any hooks for suite-wide setup and teardown.

That changed in Bats 1.7.0, which introduced the setup_suite and
teardown_suite hooks.  These hooks make it easier to run a subset of the
tests, which is a good thing.

In the past, to run a subset of the tests, one had to do:
  $ bats ./test/system/000-setup.bats ./test/system/002-help.bats \
      ./test/system/999-teardown.bats

Now, one only has to do:
  $ bats ./test/system/002-help.bats

Commit e22a82f already added a dependency on Bats >= 1.7.0.
Therefore, it should be exploited wherever possible to simplify things.

[1] Commit 54a2ca1
    containers#751

[2] Bats commit fb467ec3f04e322a
    bats-core/bats-core#39
    https://bats-core.readthedocs.io/en/stable/writing-tests.html
debarshiray added a commit to debarshiray/toolbox that referenced this issue Jun 21, 2023
The 000-setup.bats and 999-teardown.bats files were added [1] at a time
when Bats didn't offer any hooks for suite-wide setup and teardown.

That changed in Bats 1.7.0, which introduced the setup_suite and
teardown_suite hooks.  These hooks make it easier to run a subset of the
tests, which is a good thing.

In the past, to run a subset of the tests, one had to do:
  $ bats ./test/system/000-setup.bats ./test/system/002-help.bats \
      ./test/system/999-teardown.bats

Now, one only has to do:
  $ bats ./test/system/002-help.bats

Commit e22a82f already added a dependency on Bats >= 1.7.0.
Therefore, it should be exploited wherever possible to simplify things.

[1] Commit 54a2ca1
    containers#751

[2] Bats commit fb467ec3f04e322a
    bats-core/bats-core#39
    https://bats-core.readthedocs.io/en/stable/writing-tests.html

containers#1317
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. Feature request A request for a new feature 2. CI Automation of testing, analysis and other actions 2. Testing Related to testing of Toolbox - unit, system,..
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant