Skip to content

Commit 10d7cfb

Browse files
committed
bats: Fix spec validation test
Use the commit that we have in Godeps.json rather than relying on runtime-spec HEAD Signed-off-by: Mrunal Patel <[email protected]>
1 parent eb217f2 commit 10d7cfb

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/integration/spec.bats

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,15 @@ function teardown() {
6666
}
6767

6868
@test "spec validator" {
69+
TESTDIR=$(pwd)
6970
cd "$HELLO_BUNDLE"
70-
# note this test runs from the temporary bundle directory not the integration root
71-
# note this test is brittle against specs changes that lead runc's spec command
72-
# todo get the validate program, gojsonschema, and schema/*s.json from godeps?
7371

7472
run git clone https://github.com/opencontainers/runtime-spec.git src/runtime-spec
73+
[ "$status" -eq 0 ]
74+
75+
SPEC_COMMIT=$(grep runtime-spec ${TESTDIR}/../../Godeps/Godeps.json -A 4 | grep Rev | cut -d":" -f 2 | tr -d ' "')
76+
run git -C src/runtime-spec reset --hard "${SPEC_COMMIT}"
77+
[ "$status" -eq 0 ]
7578
[ -e src/runtime-spec/schema/schema.json ]
7679

7780
run bash -c "GOPATH='$GOPATH' go get github.com/xeipuuv/gojsonschema"

0 commit comments

Comments
 (0)