diff --git a/go.mod b/go.mod index 8257b85839..284c1c3a6b 100644 --- a/go.mod +++ b/go.mod @@ -7,6 +7,7 @@ require ( github.com/ghodss/yaml v1.0.0 github.com/gogo/protobuf v1.0.0 // indirect github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b + github.com/google/go-cmp v0.3.0 github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/json-iterator/go v1.1.6 // indirect diff --git a/go.sum b/go.sum index f7bdabe92a..c9ea4d6ce3 100644 --- a/go.sum +++ b/go.sum @@ -7,6 +7,8 @@ github.com/gogo/protobuf v1.0.0 h1:2jyBKDKU/8v3v2xVR2PtiWQviFUyiaGk2rpfyFT8rTM= github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf h1:+RRA9JqSOZFfKrOeqr2z77+8R2RKyh8PG66dcu1V0ck= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= diff --git a/hack/run-integration-tests.sh b/hack/run-integration-tests.sh index ea27b31f6c..02f0d6f9ad 100755 --- a/hack/run-integration-tests.sh +++ b/hack/run-integration-tests.sh @@ -47,4 +47,4 @@ fi KREW_BINARY="${krew_binary_realpath}" export KREW_BINARY -go test -test.v sigs.k8s.io/krew/integration_test +GO111MODULE=on go test -test.v sigs.k8s.io/krew/integration_test diff --git a/hack/run-lint.sh b/hack/run-lint.sh index 6ad52a06c9..983fe20af8 100755 --- a/hack/run-lint.sh +++ b/hack/run-lint.sh @@ -16,6 +16,8 @@ set -euo pipefail +[[ -n "${DEBUG:-}" ]] && set -x + if ! [[ -x "$GOPATH/bin/golangci-lint" ]] then echo 'Installing golangci-lint' @@ -23,4 +25,4 @@ then fi # configured by .golangci.yml -"$GOPATH/bin/golangci-lint" run +GO111MODULE=on "$GOPATH/bin/golangci-lint" run diff --git a/hack/run-tests.sh b/hack/run-tests.sh index 3c06f53a25..5177602c09 100755 --- a/hack/run-tests.sh +++ b/hack/run-tests.sh @@ -44,7 +44,7 @@ print_with_color "$color_blue" 'Running gofmt' "$SCRIPTDIR"/verify-gofmt.sh print_with_color "$color_blue" 'Running tests' -go test -v -short -race sigs.k8s.io/krew/... +GO111MODULE=on go test -v -short -race sigs.k8s.io/krew/... print_with_color "$color_blue" 'Running linter' "$SCRIPTDIR"/run-lint.sh