Skip to content

Commit

Permalink
test/system: Optimize the 'create' tests
Browse files Browse the repository at this point in the history
The system tests can be very I/O intensive, because many of them copy
OCI images from the test suite's image cache directory to its local
container/storage store, create containers, and then delete everything
to run the next test with a clean slate.  This makes them slow.

In the case of these two particular tests, toolbox(1) is supposed to
validate the command line options before trying to find the image.  So,
there's no need to copy the image from the test suite's image cache
directory to its local container/storage store.

If the toolbox(1) code breaks, then either it won't throw the expected
error or it will download the image before validating the command line
options.  The first possibility will be easily detected.  The other
could have been harder to notice, but, fortunately, commit
55c0e63 added variants of these tests without the --assumeyes
option and there are other tests to ensure that images cannot be
downloaded without that option.  So, any unexpected attempts to download
the image will be caught by those variants of these tests.

Fallout from 32b147b

#1595
  • Loading branch information
debarshiray committed Nov 14, 2024
1 parent 91c5396 commit adc8650
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions test/system/101-create.bats
Original file line number Diff line number Diff line change
Expand Up @@ -780,8 +780,6 @@ teardown() {
}

@test "create: Try using both --distro and --image (using --assumeyes)" {
pull_distro_image fedora 34

run "$TOOLBX" --assumeyes create --distro fedora --image fedora-toolbox:34

assert_failure
Expand All @@ -802,8 +800,6 @@ teardown() {
}

@test "create: Try using both --image and --release (using --assumeyes)" {
pull_distro_image fedora 34

run "$TOOLBX" --assumeyes create --image fedora-toolbox:34 --release 34

assert_failure
Expand Down

0 comments on commit adc8650

Please sign in to comment.