Update testdata generation command
This commit is contained in:
@@ -23,11 +23,14 @@ source "${KUBE_ROOT}/hack/lib/init.sh"
|
||||
|
||||
kube::golang::setup_env
|
||||
|
||||
# run in module mode to match test command in readme.md
|
||||
export GO111MODULE=on
|
||||
|
||||
# UPDATE_COMPATIBILITY_FIXTURE_DATA=true regenerates fixture data if needed.
|
||||
# -run //HEAD only runs the test cases comparing against testdata for HEAD.
|
||||
# We suppress the output because we are expecting to have changes.
|
||||
# We suppress the test failure that occurs when there are changes.
|
||||
UPDATE_COMPATIBILITY_FIXTURE_DATA=true go test ./vendor/k8s.io/api -run //HEAD >/dev/null 2>&1 || true
|
||||
UPDATE_COMPATIBILITY_FIXTURE_DATA=true go test k8s.io/api -run //HEAD >/dev/null 2>&1 || true
|
||||
|
||||
# Now that we have regenerated data at HEAD, run the test without suppressing output or failures
|
||||
go test ./vendor/k8s.io/api -run //HEAD -count=1
|
||||
go test k8s.io/api -run //HEAD -count=1
|
||||
|
Reference in New Issue
Block a user