1
0
mirror of https://github.com/rancher/steve.git synced 2025-06-24 22:12:02 +00:00
steve/scripts/test.sh

14 lines
397 B
Bash
Raw Normal View History

2022-10-14 20:02:53 +00:00
#!/bin/bash
if ! command -v setup-envtest; then
echo "setup-envtest is required for tests, but was not installed"
echo "see the 'Running Tests' section of the readme for install instructions"
exit 127
fi
minor=$(go list -m all | grep 'k8s.io/client-go' | cut -d ' ' -f 2 | cut -d '.' -f 2)
version="1.$minor.x"
export KUBEBUILDER_ASSETS=$(setup-envtest use -p path "$version")
go test ./...