mirror of
https://github.com/containers/podman.git
synced 2025-11-30 18:18:18 +08:00
Merge pull request #23853 from edsantiago/safename-110
CI: make 110-history parallel-safe
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
load helpers
|
load helpers
|
||||||
|
|
||||||
|
# bats test_tags=ci:parallel
|
||||||
@test "podman history - basic tests" {
|
@test "podman history - basic tests" {
|
||||||
tests="
|
tests="
|
||||||
| .*[0-9a-f]\\\{12\\\} .* CMD .* LABEL
|
| .*[0-9a-f]\\\{12\\\} .* CMD .* LABEL
|
||||||
@@ -23,17 +24,26 @@ load helpers
|
|||||||
done < <(parse_table "$tests")
|
done < <(parse_table "$tests")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# bats test_tags=ci:parallel
|
||||||
@test "podman history - custom format" {
|
@test "podman history - custom format" {
|
||||||
run_podman history --format "{{.ID}}\t{{.ID}}" $IMAGE
|
run_podman history --format "--{{.ID}}--{{.Created}}--{{.CreatedBy}}--" $IMAGE
|
||||||
od -c <<<$output
|
|
||||||
while IFS= read -r row; do
|
|
||||||
is "$row" ".* .*$"
|
|
||||||
done <<<$output
|
|
||||||
|
|
||||||
|
defer-assertion-failures
|
||||||
|
|
||||||
|
for i in $(seq 1 "${#lines[*]}"); do
|
||||||
|
# most layer IDs are "<missing>" but at least one should be a SHA
|
||||||
|
assert "${lines[$((i-1))]}" =~ "^--([0-9a-f]+|<missing>)--.* ago--/bin/sh -c.*" \
|
||||||
|
"history line $i"
|
||||||
|
done
|
||||||
|
|
||||||
|
# Normally this should be "[$IMAGE]" (bracket IMAGE bracket).
|
||||||
|
# When run in parallel with other tests, the image may have
|
||||||
|
# other tags.
|
||||||
run_podman history --format "{{.Tags}}" $IMAGE
|
run_podman history --format "{{.Tags}}" $IMAGE
|
||||||
is "$output" "\[$IMAGE\].*" "podman history sets tags"
|
assert "${lines[0]}" =~ "( |\[)$IMAGE(\]| )" "podman history tags"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# bats test_tags=ci:parallel
|
||||||
@test "podman history - json" {
|
@test "podman history - json" {
|
||||||
# Sigh. Timestamp in .created can be '...Z' or '...-06:00'
|
# Sigh. Timestamp in .created can be '...Z' or '...-06:00'
|
||||||
tests="
|
tests="
|
||||||
@@ -61,6 +71,7 @@ size | -\\\?[0-9]\\\+
|
|||||||
done < <(parse_table "$tests")
|
done < <(parse_table "$tests")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# bats test_tags=ci:parallel
|
||||||
@test "podman image history Created" {
|
@test "podman image history Created" {
|
||||||
# Values from image LIST
|
# Values from image LIST
|
||||||
run_podman image list --format '{{.CreatedSince}}\n{{.CreatedAt}}' $IMAGE
|
run_podman image list --format '{{.CreatedSince}}\n{{.CreatedAt}}' $IMAGE
|
||||||
|
|||||||
Reference in New Issue
Block a user