diff --git a/test/e2e/BUILD b/test/e2e/BUILD index 7e96fcebc5c..686448940f5 100644 --- a/test/e2e/BUILD +++ b/test/e2e/BUILD @@ -8,6 +8,37 @@ load( "go_test", ) +go_test( + name = "go_default_test", + srcs = [ + "e2e_test.go", + "metrics_grabber_test.go", + "taints_test.go", + ], + library = ":go_default_library", + tags = ["automanaged"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/client/clientset_generated/clientset:go_default_library", + "//pkg/metrics:go_default_library", + "//test/e2e/autoscaling:go_default_library", + "//test/e2e/cluster-logging:go_default_library", + "//test/e2e/framework:go_default_library", + "//test/e2e/perf:go_default_library", + "//test/e2e/scheduling:go_default_library", + "//test/e2e/storage:go_default_library", + "//test/utils:go_default_library", + "//vendor:github.com/onsi/ginkgo", + "//vendor:github.com/onsi/gomega", + "//vendor:github.com/stretchr/testify/assert", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", + "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/tools/cache", + ], +) + go_library( name = "go_default_library", srcs = [ @@ -53,19 +84,12 @@ go_library( "networking.go", "networking_perf.go", "nodeoutofdisk.go", - "pd.go", - "persistent_volumes.go", - "persistent_volumes-disruptive.go", - "persistent_volumes-gce.go", - "persistent_volumes-vsphere.go", "pod_gc.go", "podpreset.go", "pods.go", "portforward.go", "pre_stop.go", "proxy.go", - "pv_reclaimpolicy.go", - "pvc_label_selector.go", "rc.go", "reboot.go", "replica_set.go", @@ -82,12 +106,6 @@ go_library( "third-party.go", "ubernetes_lite.go", "util_iperf.go", - "volume_provisioning.go", - "volumes.go", - "vsphere_utils.go", - "vsphere_volume_diskformat.go", - "vsphere_volume_ops_storm.go", - "vsphere_volume_placement.go", ], tags = ["automanaged"], deps = [ @@ -103,16 +121,11 @@ go_library( "//pkg/apis/extensions/v1beta1:go_default_library", "//pkg/apis/rbac/v1beta1:go_default_library", "//pkg/apis/settings/v1alpha1:go_default_library", - "//pkg/apis/storage/v1:go_default_library", - "//pkg/apis/storage/v1/util:go_default_library", - "//pkg/apis/storage/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", - "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/extensions/v1beta1:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/cloudprovider:go_default_library", "//pkg/cloudprovider/providers/gce:go_default_library", - "//pkg/cloudprovider/providers/vsphere:go_default_library", "//pkg/controller:go_default_library", "//pkg/controller/daemon:go_default_library", "//pkg/controller/deployment/util:go_default_library", @@ -132,7 +145,6 @@ go_library( "//pkg/util/exec:go_default_library", "//pkg/util/logs:go_default_library", "//pkg/util/version:go_default_library", - "//pkg/volume/util/volumehelper:go_default_library", "//plugin/pkg/admission/serviceaccount:go_default_library", "//plugin/pkg/scheduler/schedulercache:go_default_library", "//test/e2e/chaosmonkey:go_default_library", @@ -145,9 +157,6 @@ go_library( "//test/e2e_federation:go_default_library", "//test/images/net/nat:go_default_library", "//test/utils:go_default_library", - "//vendor:github.com/aws/aws-sdk-go/aws", - "//vendor:github.com/aws/aws-sdk-go/aws/session", - "//vendor:github.com/aws/aws-sdk-go/service/ec2", "//vendor:github.com/elazarl/goproxy", "//vendor:github.com/ghodss/yaml", "//vendor:github.com/golang/glog", @@ -157,12 +166,8 @@ go_library( "//vendor:github.com/onsi/ginkgo/config", "//vendor:github.com/onsi/ginkgo/reporters", "//vendor:github.com/onsi/gomega", - "//vendor:github.com/vmware/govmomi/find", - "//vendor:github.com/vmware/govmomi/vim25/types", "//vendor:golang.org/x/crypto/ssh", - "//vendor:golang.org/x/net/context", "//vendor:golang.org/x/net/websocket", - "//vendor:google.golang.org/api/googleapi", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/api/resource", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", @@ -192,39 +197,6 @@ go_library( ], ) -go_test( - name = "go_default_test", - srcs = [ - "e2e_test.go", - "metrics_grabber_test.go", - "taints_test.go", - ], - library = ":go_default_library", - tags = [ - "automanaged", - "integration", - ], - deps = [ - "//pkg/api/v1:go_default_library", - "//pkg/client/clientset_generated/clientset:go_default_library", - "//pkg/metrics:go_default_library", - "//test/e2e/autoscaling:go_default_library", - "//test/e2e/cluster-logging:go_default_library", - "//test/e2e/framework:go_default_library", - "//test/e2e/perf:go_default_library", - "//test/e2e/scheduling:go_default_library", - "//test/utils:go_default_library", - "//vendor:github.com/onsi/ginkgo", - "//vendor:github.com/onsi/gomega", - "//vendor:github.com/stretchr/testify/assert", - "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", - "//vendor:k8s.io/apimachinery/pkg/fields", - "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apimachinery/pkg/watch", - "//vendor:k8s.io/client-go/tools/cache", - ], -) - genrule( name = "gen_e2e.test", testonly = 1, @@ -254,6 +226,7 @@ filegroup( "//test/e2e/perf:all-srcs", "//test/e2e/perftype:all-srcs", "//test/e2e/scheduling:all-srcs", + "//test/e2e/storage:all-srcs", "//test/e2e/testing-manifests:all-srcs", "//test/e2e/upgrades:all-srcs", ], diff --git a/test/e2e/e2e_test.go b/test/e2e/e2e_test.go index b3663496f60..0d382763696 100644 --- a/test/e2e/e2e_test.go +++ b/test/e2e/e2e_test.go @@ -24,6 +24,7 @@ import ( "k8s.io/kubernetes/test/e2e/framework" _ "k8s.io/kubernetes/test/e2e/perf" _ "k8s.io/kubernetes/test/e2e/scheduling" + _ "k8s.io/kubernetes/test/e2e/storage" ) func init() { diff --git a/test/e2e/storage/BUILD b/test/e2e/storage/BUILD new file mode 100644 index 00000000000..80f477550d0 --- /dev/null +++ b/test/e2e/storage/BUILD @@ -0,0 +1,73 @@ +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", +) + +go_library( + name = "go_default_library", + srcs = [ + "pd.go", + "persistent_volumes.go", + "persistent_volumes-disruptive.go", + "persistent_volumes-gce.go", + "persistent_volumes-vsphere.go", + "pv_reclaimpolicy.go", + "pvc_label_selector.go", + "volume_provisioning.go", + "volumes.go", + "vsphere_utils.go", + "vsphere_volume_diskformat.go", + "vsphere_volume_ops_storm.go", + "vsphere_volume_placement.go", + ], + tags = ["automanaged"], + deps = [ + "//pkg/api:go_default_library", + "//pkg/api/v1:go_default_library", + "//pkg/apis/rbac/v1beta1:go_default_library", + "//pkg/apis/storage/v1:go_default_library", + "//pkg/apis/storage/v1/util:go_default_library", + "//pkg/apis/storage/v1beta1:go_default_library", + "//pkg/client/clientset_generated/clientset:go_default_library", + "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", + "//pkg/cloudprovider/providers/vsphere:go_default_library", + "//pkg/volume/util/volumehelper:go_default_library", + "//test/e2e/framework:go_default_library", + "//vendor:github.com/aws/aws-sdk-go/aws", + "//vendor:github.com/aws/aws-sdk-go/aws/session", + "//vendor:github.com/aws/aws-sdk-go/service/ec2", + "//vendor:github.com/onsi/ginkgo", + "//vendor:github.com/onsi/gomega", + "//vendor:github.com/vmware/govmomi/find", + "//vendor:github.com/vmware/govmomi/vim25/types", + "//vendor:golang.org/x/net/context", + "//vendor:google.golang.org/api/googleapi", + "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/api/resource", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/labels", + "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/apimachinery/pkg/util/uuid", + "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/apiserver/pkg/authentication/serviceaccount", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], +) diff --git a/test/e2e/storage/OWNERS b/test/e2e/storage/OWNERS new file mode 100644 index 00000000000..2de902ff849 --- /dev/null +++ b/test/e2e/storage/OWNERS @@ -0,0 +1,15 @@ +approvers: +- saad-aali +- rootfs +- gnufied +- jingxu97 +- jsafrane +reviewers: +- saad-aali +- rootfs +- gnufied +- jingxu97 +- jsafrane +- msau42 +- jeffvance +- copejon \ No newline at end of file diff --git a/test/e2e/pd.go b/test/e2e/storage/pd.go similarity index 99% rename from test/e2e/pd.go rename to test/e2e/storage/pd.go index aafef7af3a6..c6ecda7ccef 100644 --- a/test/e2e/pd.go +++ b/test/e2e/storage/pd.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package storage import ( "fmt" diff --git a/test/e2e/persistent_volumes-disruptive.go b/test/e2e/storage/persistent_volumes-disruptive.go similarity index 99% rename from test/e2e/persistent_volumes-disruptive.go rename to test/e2e/storage/persistent_volumes-disruptive.go index 478ead8f8a4..e52978e45d7 100644 --- a/test/e2e/persistent_volumes-disruptive.go +++ b/test/e2e/storage/persistent_volumes-disruptive.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package storage import ( "fmt" diff --git a/test/e2e/persistent_volumes-gce.go b/test/e2e/storage/persistent_volumes-gce.go similarity index 99% rename from test/e2e/persistent_volumes-gce.go rename to test/e2e/storage/persistent_volumes-gce.go index ac25971f7c2..57e75fd09f8 100644 --- a/test/e2e/persistent_volumes-gce.go +++ b/test/e2e/storage/persistent_volumes-gce.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package storage import ( "time" diff --git a/test/e2e/persistent_volumes-vsphere.go b/test/e2e/storage/persistent_volumes-vsphere.go similarity index 98% rename from test/e2e/persistent_volumes-vsphere.go rename to test/e2e/storage/persistent_volumes-vsphere.go index 1e0350ae4fc..62fdb792f1d 100644 --- a/test/e2e/persistent_volumes-vsphere.go +++ b/test/e2e/storage/persistent_volumes-vsphere.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package storage import ( apierrs "k8s.io/apimachinery/pkg/api/errors" @@ -133,7 +133,7 @@ var _ = framework.KubeDescribe("PersistentVolumes:vsphere", func() { 2. Delete PV 3. Delete Volume (vmdk) */ - AddCleanupAction(func() { + framework.AddCleanupAction(func() { if len(volumePath) > 0 { waitForVSphereDiskToDetach(vsp, volumePath, node) vsp.DeleteVolume(volumePath) diff --git a/test/e2e/persistent_volumes.go b/test/e2e/storage/persistent_volumes.go similarity index 99% rename from test/e2e/persistent_volumes.go rename to test/e2e/storage/persistent_volumes.go index ddaaf7f4ccd..661f9d25360 100644 --- a/test/e2e/persistent_volumes.go +++ b/test/e2e/storage/persistent_volumes.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package storage import ( "fmt" diff --git a/test/e2e/pv_reclaimpolicy.go b/test/e2e/storage/pv_reclaimpolicy.go similarity index 99% rename from test/e2e/pv_reclaimpolicy.go rename to test/e2e/storage/pv_reclaimpolicy.go index 4b7281ed0bf..9aaf238285a 100644 --- a/test/e2e/pv_reclaimpolicy.go +++ b/test/e2e/storage/pv_reclaimpolicy.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package storage import ( "strconv" diff --git a/test/e2e/pvc_label_selector.go b/test/e2e/storage/pvc_label_selector.go similarity index 99% rename from test/e2e/pvc_label_selector.go rename to test/e2e/storage/pvc_label_selector.go index 6faaf042493..3aadbb24d6c 100644 --- a/test/e2e/pvc_label_selector.go +++ b/test/e2e/storage/pvc_label_selector.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package storage import ( "time" diff --git a/test/e2e/volume_provisioning.go b/test/e2e/storage/volume_provisioning.go similarity index 99% rename from test/e2e/volume_provisioning.go rename to test/e2e/storage/volume_provisioning.go index 4d330800e85..61e9eba304e 100644 --- a/test/e2e/volume_provisioning.go +++ b/test/e2e/storage/volume_provisioning.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package storage import ( "fmt" diff --git a/test/e2e/volumes.go b/test/e2e/storage/volumes.go similarity index 99% rename from test/e2e/volumes.go rename to test/e2e/storage/volumes.go index 4f4b7cadb53..1e6580e8c2e 100644 --- a/test/e2e/volumes.go +++ b/test/e2e/storage/volumes.go @@ -40,7 +40,7 @@ limitations under the License. // test/e2e/common/volumes.go duplicates the GlusterFS test from this file. Any changes made to this // test should be made there as well. -package e2e +package storage import ( "os/exec" diff --git a/test/e2e/vsphere_utils.go b/test/e2e/storage/vsphere_utils.go similarity index 99% rename from test/e2e/vsphere_utils.go rename to test/e2e/storage/vsphere_utils.go index 6a1f915640b..988c8eb7564 100644 --- a/test/e2e/vsphere_utils.go +++ b/test/e2e/storage/vsphere_utils.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package storage import ( "fmt" diff --git a/test/e2e/vsphere_volume_diskformat.go b/test/e2e/storage/vsphere_volume_diskformat.go similarity index 99% rename from test/e2e/vsphere_volume_diskformat.go rename to test/e2e/storage/vsphere_volume_diskformat.go index e8f9d6b6835..3ae91e17005 100644 --- a/test/e2e/vsphere_volume_diskformat.go +++ b/test/e2e/storage/vsphere_volume_diskformat.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package storage import ( "os" @@ -80,7 +80,7 @@ var _ = framework.KubeDescribe("Volume Disk Format [Volumes]", func() { isNodeLabeled = true } }) - AddCleanupAction(func() { + framework.AddCleanupAction(func() { if len(nodeLabelValue) > 0 { framework.RemoveLabelOffNode(client, nodeName, "vsphere_e2e_label") } diff --git a/test/e2e/vsphere_volume_ops_storm.go b/test/e2e/storage/vsphere_volume_ops_storm.go similarity index 99% rename from test/e2e/vsphere_volume_ops_storm.go rename to test/e2e/storage/vsphere_volume_ops_storm.go index 641d0a58b5f..cbc8ec6ebce 100644 --- a/test/e2e/vsphere_volume_ops_storm.go +++ b/test/e2e/storage/vsphere_volume_ops_storm.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package storage import ( "fmt" diff --git a/test/e2e/vsphere_volume_placement.go b/test/e2e/storage/vsphere_volume_placement.go similarity index 99% rename from test/e2e/vsphere_volume_placement.go rename to test/e2e/storage/vsphere_volume_placement.go index c6545d6d7d6..3efa17a6b37 100644 --- a/test/e2e/vsphere_volume_placement.go +++ b/test/e2e/storage/vsphere_volume_placement.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package storage import ( "fmt" @@ -75,7 +75,7 @@ var _ = framework.KubeDescribe("Volume Placement [Volume]", func() { 1. Remove labels assigned to node 1 and node 2 2. Delete VMDK volume */ - AddCleanupAction(func() { + framework.AddCleanupAction(func() { if len(node1KeyValueLabel) > 0 { framework.RemoveLabelOffNode(c, node1Name, "vsphere_e2e_label") }