mirror of
https://github.com/containers/skopeo.git
synced 2026-07-14 22:28:37 +00:00
Always be sure to check $status after using the run helper. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com> Closes: #313 Approved by: rhatdan
18 lines
407 B
Bash
18 lines
407 B
Bash
#!/usr/bin/env bats
|
|
|
|
load helpers
|
|
|
|
@test "buildah version test" {
|
|
run buildah version
|
|
echo "$output"
|
|
[ "$status" -eq 0 ]
|
|
}
|
|
|
|
@test "buildah version up to date in .spec file" {
|
|
run buildah version
|
|
[ "$status" -eq 0 ]
|
|
bversion=$(echo "$output" | awk '/^Version:/ { print $NF }')
|
|
rversion=$(cat ${TESTSDIR}/../contrib/rpm/buildah.spec | awk '/^Version:/ { print $NF }')
|
|
test "$bversion" = "$rversion"
|
|
}
|