Skip to content

Commit

Permalink
Merge pull request #23853 from edsantiago/safename-110
Browse files Browse the repository at this point in the history
CI: make 110-history parallel-safe
  • Loading branch information
openshift-merge-bot[bot] committed Sep 4, 2024
2 parents 4296c42 + 0e1ac9c commit a9532c2
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions test/system/110-history.bats
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

load helpers

# bats test_tags=ci:parallel
@test "podman history - basic tests" {
tests="
| .*[0-9a-f]\\\{12\\\} .* CMD .* LABEL
Expand All @@ -23,17 +24,26 @@ load helpers
done < <(parse_table "$tests")
}

# bats test_tags=ci:parallel
@test "podman history - custom format" {
run_podman history --format "{{.ID}}\t{{.ID}}" $IMAGE
od -c <<<$output
while IFS= read -r row; do
is "$row" ".* .*$"
done <<<$output
run_podman history --format "--{{.ID}}--{{.Created}}--{{.CreatedBy}}--" $IMAGE

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
is "$output" "\[$IMAGE\].*" "podman history sets tags"
assert "${lines[0]}" =~ "( |\[)$IMAGE(\]| )" "podman history tags"
}

# bats test_tags=ci:parallel
@test "podman history - json" {
# Sigh. Timestamp in .created can be '...Z' or '...-06:00'
tests="
Expand Down Expand Up @@ -61,6 +71,7 @@ size | -\\\?[0-9]\\\+
done < <(parse_table "$tests")
}

# bats test_tags=ci:parallel
@test "podman image history Created" {
# Values from image LIST
run_podman image list --format '{{.CreatedSince}}\n{{.CreatedAt}}' $IMAGE
Expand Down

1 comment on commit a9532c2

@packit-as-a-service
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

podman-next COPR build failed. @containers/packit-build please check.

Please sign in to comment.