test/e2e/windows/:Use e2eskipper package

This commit is contained in:
tanjunchen 2020-01-11 15:27:54 +08:00
parent ace98e1382
commit f3b9a6e12f
8 changed files with 15 additions and 8 deletions

View File

@ -39,6 +39,7 @@ go_library(
"//test/e2e/framework/node:go_default_library",
"//test/e2e/framework/pod:go_default_library",
"//test/e2e/framework/service:go_default_library",
"//test/e2e/framework/skipper:go_default_library",
"//test/utils:go_default_library",
"//test/utils/image:go_default_library",
"//vendor/github.com/onsi/ginkgo:go_default_library",

View File

@ -23,6 +23,7 @@ import (
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/kubernetes/test/e2e/framework"
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
imageutils "k8s.io/kubernetes/test/utils/image"
"github.com/onsi/ginkgo"
@ -31,7 +32,7 @@ import (
var _ = SIGDescribe("DNS", func() {
ginkgo.BeforeEach(func() {
framework.SkipUnlessNodeOSDistroIs("windows")
e2eskipper.SkipUnlessNodeOSDistroIs("windows")
})
f := framework.NewDefaultFramework("dns")

View File

@ -17,7 +17,7 @@ limitations under the License.
package windows
import (
"k8s.io/kubernetes/test/e2e/framework"
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
"github.com/onsi/ginkgo"
)
@ -27,7 +27,7 @@ func SIGDescribe(text string, body func()) bool {
return ginkgo.Describe("[sig-windows] "+text, func() {
ginkgo.BeforeEach(func() {
// all tests in this package are Windows specific
framework.SkipUnlessNodeOSDistroIs("windows")
e2eskipper.SkipUnlessNodeOSDistroIs("windows")
})
body()

View File

@ -52,6 +52,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
clientset "k8s.io/client-go/kubernetes"
"k8s.io/kubernetes/test/e2e/framework"
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
imageutils "k8s.io/kubernetes/test/utils/image"
"github.com/onsi/ginkgo"
@ -87,7 +88,7 @@ var _ = SIGDescribe("[Feature:Windows] [Feature:WindowsGMSA] GMSA Full [Slow]",
ginkgo.By("finding the worker node that fulfills this test's assumptions")
nodes := findPreconfiguredGmsaNodes(f.ClientSet)
if len(nodes) != 1 {
framework.Skipf("Expected to find exactly one node with the %q label, found %d", gmsaFullNodeLabel, len(nodes))
e2eskipper.Skipf("Expected to find exactly one node with the %q label, found %d", gmsaFullNodeLabel, len(nodes))
}
node := nodes[0]

View File

@ -23,6 +23,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/uuid"
"k8s.io/kubernetes/test/e2e/framework"
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
imageutils "k8s.io/kubernetes/test/utils/image"
"github.com/onsi/ginkgo"
@ -43,7 +44,7 @@ var _ = SIGDescribe("Hybrid cluster network", func() {
f := framework.NewDefaultFramework("hybrid-network")
ginkgo.BeforeEach(func() {
framework.SkipUnlessNodeOSDistroIs("windows")
e2eskipper.SkipUnlessNodeOSDistroIs("windows")
})
ginkgo.Context("for all supported CNIs", func() {

View File

@ -36,6 +36,7 @@ import (
kubeletconfig "k8s.io/kubernetes/pkg/kubelet/apis/config"
"k8s.io/kubernetes/test/e2e/framework"
e2ekubectl "k8s.io/kubernetes/test/e2e/framework/kubectl"
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
imageutils "k8s.io/kubernetes/test/utils/image"
"github.com/onsi/ginkgo"
@ -48,7 +49,7 @@ var _ = SIGDescribe("[Feature:Windows] Memory Limits [Serial] [Slow]", func() {
ginkgo.BeforeEach(func() {
// NOTE(vyta): these tests are Windows specific
framework.SkipUnlessNodeOSDistroIs("windows")
e2eskipper.SkipUnlessNodeOSDistroIs("windows")
})
ginkgo.Context("Allocatable node memory", func() {

View File

@ -24,6 +24,7 @@ import (
"k8s.io/kubernetes/test/e2e/framework"
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
e2eservice "k8s.io/kubernetes/test/e2e/framework/service"
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
"github.com/onsi/ginkgo"
)
@ -35,7 +36,7 @@ var _ = SIGDescribe("Services", func() {
ginkgo.BeforeEach(func() {
//Only for Windows containers
framework.SkipUnlessNodeOSDistroIs("windows")
e2eskipper.SkipUnlessNodeOSDistroIs("windows")
cs = f.ClientSet
})
ginkgo.It("should be able to create a functioning NodePort service for Windows", func() {

View File

@ -23,6 +23,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/uuid"
"k8s.io/kubernetes/test/e2e/framework"
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
imageutils "k8s.io/kubernetes/test/utils/image"
"github.com/onsi/ginkgo"
@ -56,7 +57,7 @@ var _ = SIGDescribe("Windows volume mounts ", func() {
}
)
ginkgo.BeforeEach(func() {
framework.SkipUnlessNodeOSDistroIs("windows")
e2eskipper.SkipUnlessNodeOSDistroIs("windows")
})
ginkgo.Context("check volume mount permissions", func() {