Skip to content

Commit 4dd2a28

Browse files
committed
added debug output on failed test and added missing assumeyes
Signed-off-by: Kilian Hanich <[email protected]>
1 parent dfebc3f commit 4dd2a28

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

test/system/101-create.bats

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ teardown() {
775775
@test "create: Build an image before creating the toolbox" {
776776
local build_context="./images/fedora/f39"
777777

778-
run "$TOOLBX" create --build "$build_context"
778+
run "$TOOLBX" --assumeyes create --build "$build_context"
779779
assert_success
780780

781781
assert_line --index 0 "Created container: fedora-toolbox"
@@ -791,12 +791,16 @@ teardown() {
791791
local build_context="./images/fedora/f39"
792792
local build_tag="testbuild"
793793

794-
run "$TOOLBX" create --build "$build_context" --build-tag "testbuild"
794+
run "$TOOLBX" --assumeyes create --build "$build_context" --build-tag "testbuild"
795795
assert_success
796796

797797
assert_line --index 0 "Created container: testbuild"
798798
assert_line --index 1 "Enter with: toolbox enter testbuild"
799-
assert [ ${#lines[q]} -eq 2 ]
799+
if [ ${#lines[q]} -ne 2 ]
800+
then
801+
echo "${output}"
802+
assert 1
803+
fi
800804

801805
run $PODMAN images --filter reference=localhost/testbuild
802806
assert_success
@@ -807,12 +811,16 @@ teardown() {
807811
local build_context="./images/fedora/f39"
808812
local build_tag="registry.fedoraproject.org/testbuild"
809813

810-
run "$TOOLBX" create --build "$build_context" --build-tag "testbuild"
814+
run "$TOOLBX" --assumeyes create --build "$build_context" --build-tag "testbuild"
811815
assert_success
812816

813817
assert_line --index 0 "Created container: testbuild"
814818
assert_line --index 1 "Enter with: toolbox enter testbuild"
815-
assert [ ${#lines[q]} -eq 2 ]
819+
if [ ${#lines[q]} -ne 2 ]
820+
then
821+
echo "${output}"
822+
assert 1
823+
fi
816824

817825
run $PODMAN images --filter reference="$build_tag"
818826
assert_success

0 commit comments

Comments
 (0)