From b9ced1957bd7712e6612525a95ddba418d4b7dc7 Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Sat, 25 Nov 2017 16:03:27 -0500 Subject: [PATCH] bazel: fix tests/ directory --- Makefile | 2 +- tests/integration/channel/BUILD.bazel | 10 ++++++++++ tests/integration/conversion/BUILD.bazel | 9 +++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4d83ddbcb6..6749dafe2a 100644 --- a/Makefile +++ b/Makefile @@ -587,7 +587,7 @@ kops-server-push: kops-server-build .PHONY: bazel-test bazel-test: - bazel ${BAZEL_OPTIONS} test //cmd/... //pkg/... //channels/... //nodeup/... //channels/... //protokube/... //dns-controller/... //upup/... //util/... //hack:verify-all --test_output=errors + bazel ${BAZEL_OPTIONS} test //cmd/... //pkg/... //channels/... //nodeup/... //channels/... //protokube/... //dns-controller/... //tests/... //upup/... //util/... //hack:verify-all --test_output=errors .PHONY: bazel-build bazel-build: diff --git a/tests/integration/channel/BUILD.bazel b/tests/integration/channel/BUILD.bazel index 24c59ff066..06109aedc7 100644 --- a/tests/integration/channel/BUILD.bazel +++ b/tests/integration/channel/BUILD.bazel @@ -3,9 +3,19 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test") go_test( name = "go_default_test", srcs = ["integration_test.go"], + data = [ + "exported_testdata", # keep + "//channels:channeldata", # keep + ], importpath = "k8s.io/kops/tests/integration/channel", deps = [ "//pkg/apis/kops:go_default_library", "//vendor/github.com/blang/semver:go_default_library", ], ) + +filegroup( + name = "exported_testdata", + srcs = glob(["simple/**"]), + visibility = ["//visibility:public"], +) diff --git a/tests/integration/conversion/BUILD.bazel b/tests/integration/conversion/BUILD.bazel index 28f766b7ee..3253eeac99 100644 --- a/tests/integration/conversion/BUILD.bazel +++ b/tests/integration/conversion/BUILD.bazel @@ -3,6 +3,9 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test") go_test( name = "go_default_test", srcs = ["integration_test.go"], + data = [ + "exported_testdata", # keep + ], importpath = "k8s.io/kops/tests/integration/conversion", deps = [ "//pkg/apis/kops:go_default_library", @@ -14,3 +17,9 @@ go_test( "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", ], ) + +filegroup( + name = "exported_testdata", + srcs = glob(["minimal/**"]), + visibility = ["//visibility:public"], +)