Merge pull request #50743 from guangxuli/migrate_e2e_ui_test

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Migrate sig-ui e2e test

**What this PR does / why we need it**:
Migrate sig-ui e2e tests

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

Ref Umbrella issue #49161

**Special notes for your reviewer**:

**Release note**:

none
This commit is contained in:
Kubernetes Submit Queue 2017-09-30 16:52:33 -07:00 committed by GitHub
commit 7656436041
6 changed files with 62 additions and 3 deletions

View File

@ -791,6 +791,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

View File

@ -28,13 +28,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",
@ -137,6 +137,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"],

View File

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

33
test/e2e/ui/BUILD Normal file
View File

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

View File

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

23
test/e2e/ui/framework.go Normal file
View File

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