Merge pull request #900 from mrunalp/fix_test

bats: Fix spec validation test
This commit is contained in:
Aleksa Sarai 2016-06-10 10:54:09 +10:00 committed by GitHub
commit e40e71f521
1 changed files with 6 additions and 3 deletions

View File

@ -66,12 +66,15 @@ function teardown() {
}
@test "spec validator" {
TESTDIR=$(pwd)
cd "$HELLO_BUNDLE"
# note this test runs from the temporary bundle directory not the integration root
# note this test is brittle against specs changes that lead runc's spec command
# todo get the validate program, gojsonschema, and schema/*s.json from godeps?
run git clone https://github.com/opencontainers/runtime-spec.git src/runtime-spec
[ "$status" -eq 0 ]
SPEC_COMMIT=$(grep runtime-spec ${TESTDIR}/../../Godeps/Godeps.json -A 4 | grep Rev | cut -d":" -f 2 | tr -d ' "')
run git -C src/runtime-spec reset --hard "${SPEC_COMMIT}"
[ "$status" -eq 0 ]
[ -e src/runtime-spec/schema/schema.json ]
run bash -c "GOPATH='$GOPATH' go get github.com/xeipuuv/gojsonschema"