From 43ea56a058e36fe0406389dc0f5a4348f48d1147 Mon Sep 17 00:00:00 2001
From: guangxuli
Date: Wed, 16 Aug 2017 15:07:12 +0800
Subject: [PATCH] migrate sig-ui e2e test
rebase
---
hack/.golint_failures | 1 +
test/e2e/BUILD | 3 ++-
test/e2e/e2e_test.go | 1 +
test/e2e/ui/BUILD | 33 +++++++++++++++++++++++++++++++++
test/e2e/{ => ui}/dashboard.go | 4 ++--
test/e2e/ui/framework.go | 23 +++++++++++++++++++++++
6 files changed, 62 insertions(+), 3 deletions(-)
create mode 100644 test/e2e/ui/BUILD
rename test/e2e/{ => ui}/dashboard.go (97%)
create mode 100644 test/e2e/ui/framework.go
diff --git a/hack/.golint_failures b/hack/.golint_failures
index 2d59b5d4299..2d6035e3285 100644
--- a/hack/.golint_failures
+++ b/hack/.golint_failures
@@ -821,6 +821,7 @@ test/e2e/scalability
test/e2e/scheduling
test/e2e/servicecatalog
test/e2e/storage
+test/e2e/ui
test/e2e/upgrades
test/e2e/upgrades/apps
test/e2e/upgrades/storage
diff --git a/test/e2e/BUILD b/test/e2e/BUILD
index c3385f84989..ad518d7626a 100644
--- a/test/e2e/BUILD
+++ b/test/e2e/BUILD
@@ -27,13 +27,13 @@ go_test(
"//test/e2e/scheduling:go_default_library",
"//test/e2e/servicecatalog:go_default_library",
"//test/e2e/storage:go_default_library",
+ "//test/e2e/ui:go_default_library",
],
)
go_library(
name = "go_default_library",
srcs = [
- "dashboard.go",
"e2e.go",
"events.go",
"example_cluster_dns.go",
@@ -134,6 +134,7 @@ filegroup(
"//test/e2e/servicecatalog:all-srcs",
"//test/e2e/storage:all-srcs",
"//test/e2e/testing-manifests:all-srcs",
+ "//test/e2e/ui:all-srcs",
"//test/e2e/upgrades:all-srcs",
],
tags = ["automanaged"],
diff --git a/test/e2e/e2e_test.go b/test/e2e/e2e_test.go
index 2275110205a..42a79107327 100644
--- a/test/e2e/e2e_test.go
+++ b/test/e2e/e2e_test.go
@@ -37,6 +37,7 @@ import (
_ "k8s.io/kubernetes/test/e2e/scheduling"
_ "k8s.io/kubernetes/test/e2e/servicecatalog"
_ "k8s.io/kubernetes/test/e2e/storage"
+ _ "k8s.io/kubernetes/test/e2e/ui"
)
func init() {
diff --git a/test/e2e/ui/BUILD b/test/e2e/ui/BUILD
new file mode 100644
index 00000000000..71409e8727f
--- /dev/null
+++ b/test/e2e/ui/BUILD
@@ -0,0 +1,33 @@
+load("@io_bazel_rules_go//go:def.bzl", "go_library")
+
+go_library(
+ name = "go_default_library",
+ srcs = [
+ "dashboard.go",
+ "framework.go",
+ ],
+ visibility = ["//visibility:public"],
+ deps = [
+ "//test/e2e/framework:go_default_library",
+ "//test/utils:go_default_library",
+ "//vendor/github.com/onsi/ginkgo:go_default_library",
+ "//vendor/github.com/onsi/gomega:go_default_library",
+ "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
+ "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
+ "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library",
+ ],
+)
+
+filegroup(
+ name = "package-srcs",
+ srcs = glob(["**"]),
+ tags = ["automanaged"],
+ visibility = ["//visibility:private"],
+)
+
+filegroup(
+ name = "all-srcs",
+ srcs = [":package-srcs"],
+ tags = ["automanaged"],
+ visibility = ["//visibility:public"],
+)
diff --git a/test/e2e/dashboard.go b/test/e2e/ui/dashboard.go
similarity index 97%
rename from test/e2e/dashboard.go
rename to test/e2e/ui/dashboard.go
index f0558da479b..9e416bebde8 100644
--- a/test/e2e/dashboard.go
+++ b/test/e2e/ui/dashboard.go
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package e2e
+package ui
import (
"context"
@@ -31,7 +31,7 @@ import (
. "github.com/onsi/gomega"
)
-var _ = framework.KubeDescribe("Kubernetes Dashboard", func() {
+var _ = SIGDescribe("Kubernetes Dashboard", func() {
const (
uiServiceName = "kubernetes-dashboard"
uiAppName = uiServiceName
diff --git a/test/e2e/ui/framework.go b/test/e2e/ui/framework.go
new file mode 100644
index 00000000000..4cf72e5aa13
--- /dev/null
+++ b/test/e2e/ui/framework.go
@@ -0,0 +1,23 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package ui
+
+import "github.com/onsi/ginkgo"
+
+func SIGDescribe(text string, body func()) bool {
+ return ginkgo.Describe("[sig-ui] "+text, body)
+}