Skip to content

Commit

Permalink
Merge pull request #5411 from BenTheElder/just-rm-the-tests
Browse files Browse the repository at this point in the history
enforce no vendored tests in test-infra
  • Loading branch information
k8s-ci-robot committed Nov 14, 2017
2 parents 6c01477 + 59dd464 commit a2e2730
Show file tree
Hide file tree
Showing 348 changed files with 73 additions and 69,576 deletions.
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

0 comments on commit a2e2730

Please sign in to comment.