mirror of
https://github.com/containers/podman.git
synced 2025-12-04 20:28:40 +08:00
podman kube play: fix broken annotation parsing
If a user did not set an equal sign in the annotation that old code would panic when accessing the second element in the slice. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@@ -444,6 +444,10 @@ _EOF
|
||||
is "$output" ".*name:$RANDOMSTRING" "Annotation should be added to pod"
|
||||
is "$output" ".*anno:$ANNOTATION_WITH_COMMA" "Annotation with comma should be added to pod"
|
||||
|
||||
# invalid annotation
|
||||
run_podman 125 kube play --annotation "val" $PODMAN_TMPDIR/test.yaml
|
||||
assert "$output" == "Error: annotation \"val\" must include an '=' sign" "invalid annotation error"
|
||||
|
||||
run_podman stop -a -t 0
|
||||
run_podman pod rm -t 0 -f test_pod
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user