use go mod instead of go get in spec.bats

Signed-off-by: lifubang <lifubang@acmcoder.com>
This commit is contained in:
lifubang
2024-03-30 23:34:56 +08:00
committed by lfbzhm
parent 03db4d633d
commit 75e02193c2

View File

@@ -31,11 +31,11 @@ function teardown() {
git clone https://github.com/opencontainers/runtime-spec.git
(cd runtime-spec && git reset --hard "$SPEC_REF")
SCHEMA='runtime-spec/schema/config-schema.json'
[ -e "$SCHEMA" ]
GO111MODULE=auto go get github.com/xeipuuv/gojsonschema
GO111MODULE=auto go build runtime-spec/schema/validate.go
cd runtime-spec/schema
go mod init runtime-spec
go mod tidy
go build ./validate.go
./validate "$SCHEMA" config.json
./validate config-schema.json ../../config.json
}