Skip to content

Commit adc8650

Browse files
committed
test/system: Optimize the 'create' tests
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
1 parent 91c5396 commit adc8650

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

test/system/101-create.bats

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -780,8 +780,6 @@ teardown() {
780780
}
781781

782782
@test "create: Try using both --distro and --image (using --assumeyes)" {
783-
pull_distro_image fedora 34
784-
785783
run "$TOOLBX" --assumeyes create --distro fedora --image fedora-toolbox:34
786784

787785
assert_failure
@@ -802,8 +800,6 @@ teardown() {
802800
}
803801

804802
@test "create: Try using both --image and --release (using --assumeyes)" {
805-
pull_distro_image fedora 34
806-
807803
run "$TOOLBX" --assumeyes create --image fedora-toolbox:34 --release 34
808804

809805
assert_failure

0 commit comments

Comments
 (0)