Segregate storage e2es for easier assignment.

Further work is needed to isolate dependencies on shared tooling.
pull/6/head
Timothy St. Clair 2017-03-19 14:25:40 -05:00
parent 32600927d9
commit 203c0df017
17 changed files with 137 additions and 75 deletions

View File

@ -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",
],

View File

@ -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() {

73
test/e2e/storage/BUILD Normal file
View File

@ -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"],
)

15
test/e2e/storage/OWNERS Normal file
View File

@ -0,0 +1,15 @@
approvers:
- saad-aali
- rootfs
- gnufied
- jingxu97
- jsafrane
reviewers:
- saad-aali
- rootfs
- gnufied
- jingxu97
- jsafrane
- msau42
- jeffvance
- copejon

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package e2e
package storage
import (
"fmt"

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package e2e
package storage
import (
"fmt"

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package e2e
package storage
import (
"time"

View File

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

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package e2e
package storage
import (
"fmt"

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package e2e
package storage
import (
"strconv"

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package e2e
package storage
import (
"time"

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package e2e
package storage
import (
"fmt"

View File

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

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package e2e
package storage
import (
"fmt"

View File

@ -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")
}

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package e2e
package storage
import (
"fmt"

View File

@ -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")
}