test/e2e_node: Add [NodeConformance] to tests tagged [Conformance]

This has no effect yet until test configurations are updated.
pull/8/head
Yu-Ju Hong 2018-05-21 16:25:45 -07:00
parent 2a989c60ff
commit 4ad9aedb04
5 changed files with 17 additions and 17 deletions

View File

@ -310,7 +310,7 @@ func checkDockerStorageDriver() error {
return fmt.Errorf("failed to find storage driver") return fmt.Errorf("failed to find storage driver")
} }
var _ = framework.KubeDescribe("GKE system requirements [Conformance] [Feature:GKEEnv]", func() { var _ = framework.KubeDescribe("GKE system requirements [Conformance][NodeConformance][Feature:GKEEnv]", func() {
BeforeEach(func() { BeforeEach(func() {
framework.RunIfSystemSpecNameIs("gke") framework.RunIfSystemSpecNameIs("gke")
}) })

View File

@ -39,7 +39,7 @@ var _ = framework.KubeDescribe("Kubelet", func() {
}) })
Context("when scheduling a busybox command in a pod", func() { Context("when scheduling a busybox command in a pod", func() {
podName := "busybox-scheduling-" + string(uuid.NewUUID()) podName := "busybox-scheduling-" + string(uuid.NewUUID())
framework.ConformanceIt("it should print the output to logs", func() { framework.ConformanceIt("it should print the output to logs [NodeConformance]", func() {
podClient.CreateSync(&v1.Pod{ podClient.CreateSync(&v1.Pod{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
Name: podName, Name: podName,
@ -164,7 +164,7 @@ var _ = framework.KubeDescribe("Kubelet", func() {
}) })
Context("when scheduling a read only busybox container", func() { Context("when scheduling a read only busybox container", func() {
podName := "busybox-readonly-fs" + string(uuid.NewUUID()) podName := "busybox-readonly-fs" + string(uuid.NewUUID())
framework.ConformanceIt("it should not write to root filesystem", func() { framework.ConformanceIt("it should not write to root filesystem [NodeConformance]", func() {
isReadOnly := true isReadOnly := true
podClient.CreateSync(&v1.Pod{ podClient.CreateSync(&v1.Pod{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{

View File

@ -84,7 +84,7 @@ var _ = framework.KubeDescribe("Container Lifecycle Hook", func() {
}, preStopWaitTimeout, podCheckInterval).Should(BeNil()) }, preStopWaitTimeout, podCheckInterval).Should(BeNil())
} }
} }
framework.ConformanceIt("should execute poststart exec hook properly", func() { framework.ConformanceIt("should execute poststart exec hook properly [NodeConformance]", func() {
lifecycle := &v1.Lifecycle{ lifecycle := &v1.Lifecycle{
PostStart: &v1.Handler{ PostStart: &v1.Handler{
Exec: &v1.ExecAction{ Exec: &v1.ExecAction{
@ -95,7 +95,7 @@ var _ = framework.KubeDescribe("Container Lifecycle Hook", func() {
podWithHook := getPodWithHook("pod-with-poststart-exec-hook", imageutils.GetE2EImage(imageutils.Hostexec), lifecycle) podWithHook := getPodWithHook("pod-with-poststart-exec-hook", imageutils.GetE2EImage(imageutils.Hostexec), lifecycle)
testPodWithHook(podWithHook) testPodWithHook(podWithHook)
}) })
framework.ConformanceIt("should execute prestop exec hook properly", func() { framework.ConformanceIt("should execute prestop exec hook properly [NodeConformance]", func() {
lifecycle := &v1.Lifecycle{ lifecycle := &v1.Lifecycle{
PreStop: &v1.Handler{ PreStop: &v1.Handler{
Exec: &v1.ExecAction{ Exec: &v1.ExecAction{
@ -106,7 +106,7 @@ var _ = framework.KubeDescribe("Container Lifecycle Hook", func() {
podWithHook := getPodWithHook("pod-with-prestop-exec-hook", imageutils.GetE2EImage(imageutils.Hostexec), lifecycle) podWithHook := getPodWithHook("pod-with-prestop-exec-hook", imageutils.GetE2EImage(imageutils.Hostexec), lifecycle)
testPodWithHook(podWithHook) testPodWithHook(podWithHook)
}) })
framework.ConformanceIt("should execute poststart http hook properly", func() { framework.ConformanceIt("should execute poststart http hook properly [NodeConformance]", func() {
lifecycle := &v1.Lifecycle{ lifecycle := &v1.Lifecycle{
PostStart: &v1.Handler{ PostStart: &v1.Handler{
HTTPGet: &v1.HTTPGetAction{ HTTPGet: &v1.HTTPGetAction{
@ -119,7 +119,7 @@ var _ = framework.KubeDescribe("Container Lifecycle Hook", func() {
podWithHook := getPodWithHook("pod-with-poststart-http-hook", imageutils.GetPauseImageName(), lifecycle) podWithHook := getPodWithHook("pod-with-poststart-http-hook", imageutils.GetPauseImageName(), lifecycle)
testPodWithHook(podWithHook) testPodWithHook(podWithHook)
}) })
framework.ConformanceIt("should execute prestop http hook properly", func() { framework.ConformanceIt("should execute prestop http hook properly [NodeConformance]", func() {
lifecycle := &v1.Lifecycle{ lifecycle := &v1.Lifecycle{
PreStop: &v1.Handler{ PreStop: &v1.Handler{
HTTPGet: &v1.HTTPGetAction{ HTTPGet: &v1.HTTPGetAction{

View File

@ -57,7 +57,7 @@ var _ = framework.KubeDescribe("MirrorPod", func() {
return checkMirrorPodRunning(f.ClientSet, mirrorPodName, ns) return checkMirrorPodRunning(f.ClientSet, mirrorPodName, ns)
}, 2*time.Minute, time.Second*4).Should(BeNil()) }, 2*time.Minute, time.Second*4).Should(BeNil())
}) })
framework.ConformanceIt("should be updated when static pod updated", func() { framework.ConformanceIt("should be updated when static pod updated [NodeConformance]", func() {
By("get mirror pod uid") By("get mirror pod uid")
pod, err := f.ClientSet.CoreV1().Pods(ns).Get(mirrorPodName, metav1.GetOptions{}) pod, err := f.ClientSet.CoreV1().Pods(ns).Get(mirrorPodName, metav1.GetOptions{})
Expect(err).ShouldNot(HaveOccurred()) Expect(err).ShouldNot(HaveOccurred())
@ -79,7 +79,7 @@ var _ = framework.KubeDescribe("MirrorPod", func() {
Expect(len(pod.Spec.Containers)).Should(Equal(1)) Expect(len(pod.Spec.Containers)).Should(Equal(1))
Expect(pod.Spec.Containers[0].Image).Should(Equal(image)) Expect(pod.Spec.Containers[0].Image).Should(Equal(image))
}) })
framework.ConformanceIt("should be recreated when mirror pod gracefully deleted", func() { framework.ConformanceIt("should be recreated when mirror pod gracefully deleted [NodeConformance]", func() {
By("get mirror pod uid") By("get mirror pod uid")
pod, err := f.ClientSet.CoreV1().Pods(ns).Get(mirrorPodName, metav1.GetOptions{}) pod, err := f.ClientSet.CoreV1().Pods(ns).Get(mirrorPodName, metav1.GetOptions{})
Expect(err).ShouldNot(HaveOccurred()) Expect(err).ShouldNot(HaveOccurred())
@ -94,7 +94,7 @@ var _ = framework.KubeDescribe("MirrorPod", func() {
return checkMirrorPodRecreatedAndRunnig(f.ClientSet, mirrorPodName, ns, uid) return checkMirrorPodRecreatedAndRunnig(f.ClientSet, mirrorPodName, ns, uid)
}, 2*time.Minute, time.Second*4).Should(BeNil()) }, 2*time.Minute, time.Second*4).Should(BeNil())
}) })
framework.ConformanceIt("should be recreated when mirror pod forcibly deleted", func() { framework.ConformanceIt("should be recreated when mirror pod forcibly deleted [NodeConformance]", func() {
By("get mirror pod uid") By("get mirror pod uid")
pod, err := f.ClientSet.CoreV1().Pods(ns).Get(mirrorPodName, metav1.GetOptions{}) pod, err := f.ClientSet.CoreV1().Pods(ns).Get(mirrorPodName, metav1.GetOptions{})
Expect(err).ShouldNot(HaveOccurred()) Expect(err).ShouldNot(HaveOccurred())

View File

@ -46,7 +46,7 @@ var _ = framework.KubeDescribe("Container Runtime Conformance Test", func() {
Describe("container runtime conformance blackbox test", func() { Describe("container runtime conformance blackbox test", func() {
Context("when starting a container that exits", func() { Context("when starting a container that exits", func() {
framework.ConformanceIt("it should run with the expected status", func() { framework.ConformanceIt("it should run with the expected status [NodeConformance]", func() {
restartCountVolumeName := "restart-count" restartCountVolumeName := "restart-count"
restartCountVolumePath := "/restart-count" restartCountVolumePath := "/restart-count"
testContainer := v1.Container{ testContainer := v1.Container{
@ -127,7 +127,7 @@ while true; do sleep 1; done
By("it should get the expected 'State'") By("it should get the expected 'State'")
Expect(GetContainerState(status.State)).To(Equal(testCase.State)) Expect(GetContainerState(status.State)).To(Equal(testCase.State))
By("it should be possible to delete [Conformance]") By("it should be possible to delete [Conformance][NodeConformance]")
Expect(terminateContainer.Delete()).To(Succeed()) Expect(terminateContainer.Delete()).To(Succeed())
Eventually(terminateContainer.Present, retryTimeout, pollInterval).Should(BeFalse()) Eventually(terminateContainer.Present, retryTimeout, pollInterval).Should(BeFalse())
} }
@ -142,7 +142,7 @@ while true; do sleep 1; done
message gomegatypes.GomegaMatcher message gomegatypes.GomegaMatcher
}{ }{
{ {
name: "if TerminationMessagePath is set [Conformance]", name: "if TerminationMessagePath is set [Conformance][NodeConformance]",
container: v1.Container{ container: v1.Container{
Image: busyboxImage, Image: busyboxImage,
Command: []string{"/bin/sh", "-c"}, Command: []string{"/bin/sh", "-c"},
@ -157,7 +157,7 @@ while true; do sleep 1; done
}, },
{ {
name: "if TerminationMessagePath is set as non-root user and at a non-default path [Conformance]", name: "if TerminationMessagePath is set as non-root user and at a non-default path [Conformance][NodeConformance]",
container: v1.Container{ container: v1.Container{
Image: busyboxImage, Image: busyboxImage,
Command: []string{"/bin/sh", "-c"}, Command: []string{"/bin/sh", "-c"},
@ -172,7 +172,7 @@ while true; do sleep 1; done
}, },
{ {
name: "from log output if TerminationMessagePolicy FallbackToLogOnError is set [Conformance]", name: "from log output if TerminationMessagePolicy FallbackToLogOnError is set [Conformance][NodeConformance]",
container: v1.Container{ container: v1.Container{
Image: busyboxImage, Image: busyboxImage,
Command: []string{"/bin/sh", "-c"}, Command: []string{"/bin/sh", "-c"},
@ -198,7 +198,7 @@ while true; do sleep 1; done
}, },
{ {
name: "from file when pod succeeds and TerminationMessagePolicy FallbackToLogOnError is set [Conformance]", name: "from file when pod succeeds and TerminationMessagePolicy FallbackToLogOnError is set [Conformance][NodeConformance]",
container: v1.Container{ container: v1.Container{
Image: busyboxImage, Image: busyboxImage,
Command: []string{"/bin/sh", "-c"}, Command: []string{"/bin/sh", "-c"},
@ -313,7 +313,7 @@ while true; do sleep 1; done
}, },
} { } {
testCase := testCase testCase := testCase
It(testCase.description+" [Conformance]", func() { It(testCase.description+" [Conformance][NodeConformance]", func() {
name := "image-pull-test" name := "image-pull-test"
command := []string{"/bin/sh", "-c", "while true; do sleep 1; done"} command := []string{"/bin/sh", "-c", "while true; do sleep 1; done"}
container := ConformanceContainer{ container := ConformanceContainer{