oci: make ExecSync with ExitCode != 0 act properly
Previously we returned an internal error result when a program had a non-zero exit code, which was incorrect. Fix this as well as change the tests to actually check the "ExitCode" response from ExecSync (rather than expecting ocic-ctr to return an internal error). Signed-off-by: Aleksa Sarai <asarai@suse.de>
This commit is contained in:
parent
32750cd3f3
commit
8a928d06e7
2 changed files with 7 additions and 13 deletions
|
@ -71,7 +71,8 @@ function teardown() {
|
|||
[ "$status" -eq 0 ]
|
||||
run ocic ctr execsync --id "$ctr_id" chmod 777 .
|
||||
echo "$output"
|
||||
[ "$status" -ne 0 ]
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" =~ "Exit code: 1" ]]
|
||||
[[ "$output" =~ "Operation not permitted" ]]
|
||||
|
||||
cleanup_ctrs
|
||||
|
@ -158,7 +159,8 @@ function teardown() {
|
|||
[ "$status" -eq 0 ]
|
||||
run ocic ctr execsync --id "$ctr_id" chmod 777 .
|
||||
echo "$output"
|
||||
[ "$status" -ne 0 ]
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" =~ "Exit code: 1" ]]
|
||||
[[ "$output" =~ "Operation not permitted" ]]
|
||||
|
||||
cleanup_ctrs
|
||||
|
@ -269,7 +271,8 @@ function teardown() {
|
|||
[ "$status" -eq 0 ]
|
||||
run ocic ctr execsync --id "$ctr_id" chmod 777 .
|
||||
echo "$output"
|
||||
[ "$status" -ne 0 ]
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" =~ "Exit code: 1" ]]
|
||||
[[ "$output" =~ "Operation not permitted" ]]
|
||||
|
||||
cleanup_ctrs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue