mirror of
https://github.com/containers/podman.git
synced 2025-12-02 02:58:03 +08:00
test: adapt tests new crun error messages
Needed-by: https://github.com/containers/crun/pull/1672 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@@ -10,7 +10,7 @@ load helpers.network
|
||||
err_no_such_cmd="Error:.*/no/such/command.*[Nn]o such file or directory"
|
||||
# runc: RHEL8 on 2023-07-17: "is a directory".
|
||||
# Everything else (crun; runc on debian): "permission denied"
|
||||
err_no_exec_dir="Error:.*exec.*\\\(permission denied\\\|is a directory\\\)"
|
||||
err_no_exec_dir="Error:.*\\\(exec.*\\\(permission denied\\\|is a directory\\\)\\\|is not a regular file\\\)"
|
||||
|
||||
tests="
|
||||
true | 0 |
|
||||
@@ -1657,14 +1657,14 @@ search | $IMAGE |
|
||||
# runc and crun emit different diagnostics
|
||||
runtime=$(podman_runtime)
|
||||
case "$runtime" in
|
||||
crun) expect='crun: executable file `` not found in $PATH: No such file or directory: OCI runtime attempted to invoke a command that was not found' ;;
|
||||
crun) expect='\(executable file `` not found in $PATH: No such file or directory: OCI runtime attempted to invoke a command that was not found\|executable path is empty\)' ;;
|
||||
runc) expect='runc: runc create failed: unable to start container process: exec: "": executable file not found in $PATH: OCI runtime attempted to invoke a command that was not found' ;;
|
||||
*) skip "Unknown runtime '$runtime'" ;;
|
||||
esac
|
||||
|
||||
# The '.*' in the error below is for dealing with podman-remote, which
|
||||
# includes "error preparing container <sha> for attach" in output.
|
||||
is "$output" "Error.*: $expect" "podman emits useful diagnostic when no entrypoint is set"
|
||||
is "$output" "Error.* $expect" "podman emits useful diagnostic when no entrypoint is set"
|
||||
}
|
||||
|
||||
# bats test_tags=ci:parallel
|
||||
|
||||
Reference in New Issue
Block a user