Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enforce no vendored tests in test-infra #5411

Merged
merged 4 commits into from
Nov 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions hack/update-bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ set -o pipefail
TESTINFRA_ROOT=$(git rev-parse --show-toplevel)
TMP_GOPATH=$(mktemp -d)

# no unit tests in vendor
# previously we used godeps which did this, but `dep` does not handle this
# properly yet. some of these tests don't build well. see:
# ref: https://github.com/kubernetes/test-infra/pull/5411
find ${TESTINFRA_ROOT}/vendor/ -name "*_test.go" -delete

"${TESTINFRA_ROOT}/hack/go_install_from_commit.sh" \
github.com/kubernetes/repo-infra/kazel \
e26fc85d14a1d3dc25569831acc06919673c545a \
Expand Down
9 changes: 8 additions & 1 deletion hack/verify-bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,16 @@ kazel_diff=$("${TMP_GOPATH}/bin/kazel" \
-print-diff \
-root="${TESTINFRA_ROOT}")

if [[ -n "${gazelle_diff}" || -n "${kazel_diff}" ]]; then
# check if there are vendor/*_test.go
# previously we used godeps which did this, but `dep` does not handle this
# properly yet. some of these tests don't build well. see:
# ref: https://github.com/kubernetes/test-infra/pull/5411
vendor_tests=$(find ${TESTINFRA_ROOT}/vendor/ -name "*_test.go" | wc -l)

if [[ -n "${gazelle_diff}" || -n "${kazel_diff}" || "${vendor_tests}" -ne "0" ]]; then
echo "${gazelle_diff}"
echo "${kazel_diff}"
echo "number of vendor/*_test.go: ${vendor_tests} (want: 0)"
echo
echo "Run ./hack/update-bazel.sh"
exit 1
Expand Down
9 changes: 1 addition & 8 deletions vendor/bitbucket.org/ww/goautoneg/BUILD

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 0 additions & 33 deletions vendor/bitbucket.org/ww/goautoneg/autoneg_test.go

This file was deleted.

10 changes: 1 addition & 9 deletions vendor/github.com/NYTimes/gziphandler/BUILD

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

134 changes: 0 additions & 134 deletions vendor/github.com/NYTimes/gziphandler/gzip_test.go

This file was deleted.

19 changes: 1 addition & 18 deletions vendor/github.com/beorn7/perks/quantile/BUILD

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

63 changes: 0 additions & 63 deletions vendor/github.com/beorn7/perks/quantile/bench_test.go

This file was deleted.

Loading