server: properly format error
`containerdID` is overridden in `s.ctrIDIndex.Get()`, if the ctr is not found it's overridden by an empty string making the error return totally unusable. Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
b9336c74a3
commit
ad3a3fcd5a
2 changed files with 14 additions and 4 deletions
|
@ -6,6 +6,16 @@ function teardown() {
|
|||
cleanup_test
|
||||
}
|
||||
|
||||
@test "ctr not found correct error message" {
|
||||
start_crio
|
||||
run crioctl ctr status --id randomid
|
||||
echo "$output"
|
||||
[ "$status" -eq 1 ]
|
||||
[[ "$output" =~ "container with ID starting with randomid not found" ]]
|
||||
|
||||
stop_crio
|
||||
}
|
||||
|
||||
@test "ctr termination reason Completed" {
|
||||
start_crio
|
||||
run crioctl pod run --config "$TESTDATA"/sandbox_config.json
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue