Merge pull request #101704 from liggitt/api-testdata

Update testdata generation command
This commit is contained in:
Kubernetes Prow Robot
2021-05-03 17:21:54 -07:00
committed by GitHub
2 changed files with 9 additions and 6 deletions

View File

@@ -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