Skip to content

Commit 02e04b9

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

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/pkg/shell/shell.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func RunContext(ctx context.Context, name string, stdin io.Reader, stdout, stder
3939
return err
4040
}
4141
if exitCode != 0 {
42-
return fmt.Errorf("failed to invoke %s(1)", name)
42+
return fmt.Errorf("failed to invoke %s(%d)", name, exitCode)
4343
}
4444
return nil
4545
}

test/system/101-create.bats

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,11 @@ teardown() {
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
@@ -812,7 +816,11 @@ teardown() {
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)