Files
skopeo/tests/version.bats
Nalin Dahyabhai e92020a4db Keep the version in the .spec file current
Add a test to compare the version we claim to be with the version
recorded in the RPM .spec file.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #202
Approved by: rhatdan
2017-07-24 13:03:42 +00:00

17 lines
386 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
bversion=$(echo "$output" | awk '/^Version:/ { print $NF }')
rversion=$(cat ${TESTSDIR}/../contrib/rpm/buildah.spec | awk '/^Version:/ { print $NF }')
test "$bversion" = "$rversion"
}