Add framework.ConformanceIt as the new way to declare conformance tests.

Also rewrite all existing conformance tests to use this.
pull/6/head
Matt Liggett 2017-10-26 10:46:09 -07:00
parent 6d73f03d2b
commit a5967cbaf1
29 changed files with 155 additions and 154 deletions

View File

@ -33,7 +33,7 @@ var _ = SIGDescribe("CustomResourceDefinition resources", func() {
f := framework.NewDefaultFramework("custom-resource-definition")
Context("Simple CustomResourceDefinition", func() {
It("creating/deleting custom resource definition objects works [Conformance]", func() {
framework.ConformanceIt("creating/deleting custom resource definition objects works ", func() {
framework.SkipUnlessServerVersionGTE(crdVersion, f.ClientSet.Discovery())

View File

@ -38,7 +38,7 @@ import (
var _ = SIGDescribe("ReplicationController", func() {
f := framework.NewDefaultFramework("replication-controller")
It("should serve a basic image on each replica with a public image [Conformance]", func() {
framework.ConformanceIt("should serve a basic image on each replica with a public image ", func() {
TestReplicationControllerServeImageOrFail(f, "basic", framework.ServeHostnameImage)
})

View File

@ -78,7 +78,7 @@ func newPodQuota(name, number string) *v1.ResourceQuota {
var _ = SIGDescribe("ReplicaSet", func() {
f := framework.NewDefaultFramework("replicaset")
It("should serve a basic image on each replica with a public image [Conformance]", func() {
framework.ConformanceIt("should serve a basic image on each replica with a public image ", func() {
testReplicaSetServeImageOrFail(f, "basic", framework.ServeHostnameImage)
})

View File

@ -158,7 +158,7 @@ var _ = SIGDescribe("ServiceAccounts", func() {
}
})
It("should mount an API token into pods [Conformance]", func() {
framework.ConformanceIt("should mount an API token into pods ", func() {
var tokenContent string
var rootCAContent string
@ -245,7 +245,7 @@ var _ = SIGDescribe("ServiceAccounts", func() {
}
})
It("should allow opting out of API token automount [Conformance]", func() {
framework.ConformanceIt("should allow opting out of API token automount ", func() {
framework.SkipUnlessServerVersionGTE(serviceAccountTokenAutomountVersion, f.ClientSet.Discovery())
var err error

View File

@ -29,7 +29,7 @@ import (
var _ = Describe("[sig-api-machinery] ConfigMap", func() {
f := framework.NewDefaultFramework("configmap")
It("should be consumable via environment variable [Conformance]", func() {
framework.ConformanceIt("should be consumable via environment variable ", func() {
name := "configmap-test-" + string(uuid.NewUUID())
configMap := newConfigMap(f, name)
By(fmt.Sprintf("Creating configMap %v/%v", f.Namespace.Name, configMap.Name))
@ -72,7 +72,7 @@ var _ = Describe("[sig-api-machinery] ConfigMap", func() {
})
})
It("should be consumable via the environment [Conformance]", func() {
framework.ConformanceIt("should be consumable via the environment ", func() {
name := "configmap-test-" + string(uuid.NewUUID())
configMap := newEnvFromConfigMap(f, name)
By(fmt.Sprintf("Creating configMap %v/%v", f.Namespace.Name, configMap.Name))

View File

@ -32,11 +32,11 @@ import (
var _ = Describe("[sig-storage] ConfigMap", func() {
f := framework.NewDefaultFramework("configmap")
It("should be consumable from pods in volume [Conformance]", func() {
framework.ConformanceIt("should be consumable from pods in volume ", func() {
doConfigMapE2EWithoutMappings(f, 0, 0, nil)
})
It("should be consumable from pods in volume with defaultMode set [Conformance]", func() {
framework.ConformanceIt("should be consumable from pods in volume with defaultMode set ", func() {
defaultMode := int32(0400)
doConfigMapE2EWithoutMappings(f, 0, 0, &defaultMode)
})
@ -46,7 +46,7 @@ var _ = Describe("[sig-storage] ConfigMap", func() {
doConfigMapE2EWithoutMappings(f, 1000, 1001, &defaultMode)
})
It("should be consumable from pods in volume as non-root [Conformance]", func() {
framework.ConformanceIt("should be consumable from pods in volume as non-root ", func() {
doConfigMapE2EWithoutMappings(f, 1000, 0, nil)
})
@ -54,16 +54,16 @@ var _ = Describe("[sig-storage] ConfigMap", func() {
doConfigMapE2EWithoutMappings(f, 1000, 1001, nil)
})
It("should be consumable from pods in volume with mappings [Conformance]", func() {
framework.ConformanceIt("should be consumable from pods in volume with mappings ", func() {
doConfigMapE2EWithMappings(f, 0, 0, nil)
})
It("should be consumable from pods in volume with mappings and Item mode set[Conformance]", func() {
framework.ConformanceIt("should be consumable from pods in volume with mappings and Item mode set", func() {
mode := int32(0400)
doConfigMapE2EWithMappings(f, 0, 0, &mode)
})
It("should be consumable from pods in volume with mappings as non-root [Conformance]", func() {
framework.ConformanceIt("should be consumable from pods in volume with mappings as non-root ", func() {
doConfigMapE2EWithMappings(f, 1000, 0, nil)
})
@ -71,7 +71,7 @@ var _ = Describe("[sig-storage] ConfigMap", func() {
doConfigMapE2EWithMappings(f, 1000, 1001, nil)
})
It("updates should be reflected in volume [Conformance]", func() {
framework.ConformanceIt("updates should be reflected in volume ", func() {
podLogTimeout := framework.GetPodSecretUpdateTimeout(f.ClientSet)
containerTimeoutArg := fmt.Sprintf("--retry_time=%v", int(podLogTimeout.Seconds()))
@ -149,7 +149,7 @@ var _ = Describe("[sig-storage] ConfigMap", func() {
Eventually(pollLogs, podLogTimeout, framework.Poll).Should(ContainSubstring("value-2"))
})
It("optional updates should be reflected in volume [Conformance]", func() {
framework.ConformanceIt("optional updates should be reflected in volume ", func() {
podLogTimeout := framework.GetPodSecretUpdateTimeout(f.ClientSet)
containerTimeoutArg := fmt.Sprintf("--retry_time=%v", int(podLogTimeout.Seconds()))
trueVal := true
@ -327,7 +327,7 @@ var _ = Describe("[sig-storage] ConfigMap", func() {
Eventually(pollDeleteLogs, podLogTimeout, framework.Poll).Should(ContainSubstring("Error reading file /etc/configmap-volumes/delete/data-1"))
})
It("should be consumable in multiple volumes in the same pod [Conformance]", func() {
framework.ConformanceIt("should be consumable in multiple volumes in the same pod ", func() {
var (
name = "configmap-test-volume-" + string(uuid.NewUUID())
volumeName = "configmap-volume"

View File

@ -54,7 +54,7 @@ var _ = framework.KubeDescribe("Probing container", func() {
Description: Make sure that pod with readiness probe should not be
ready before initial delay and never restart.
*/
It("with readiness probe should not be ready before initial delay and never restart [Conformance]", func() {
framework.ConformanceIt("with readiness probe should not be ready before initial delay and never restart ", func() {
p := podClient.Create(makePodSpec(probe.withInitialDelay().build(), nil))
f.WaitForPodReady(p.Name)
@ -86,7 +86,7 @@ var _ = framework.KubeDescribe("Probing container", func() {
Description: Make sure that pod with readiness probe that fails should
never be ready and never restart.
*/
It("with readiness probe that fails should never be ready and never restart [Conformance]", func() {
framework.ConformanceIt("with readiness probe that fails should never be ready and never restart ", func() {
p := podClient.Create(makePodSpec(probe.withFailing().build(), nil))
Consistently(func() (bool, error) {
p, err := podClient.Get(p.Name, metav1.GetOptions{})
@ -111,7 +111,7 @@ var _ = framework.KubeDescribe("Probing container", func() {
Description: Make sure the pod is restarted with a cat /tmp/health
liveness probe.
*/
It("should be restarted with a exec \"cat /tmp/health\" liveness probe [Conformance]", func() {
framework.ConformanceIt("should be restarted with a exec \"cat /tmp/health\" liveness probe", func() {
runLivenessTest(f, &v1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: "liveness-exec",
@ -143,7 +143,7 @@ var _ = framework.KubeDescribe("Probing container", func() {
Description: Make sure the pod is not restarted with a cat /tmp/health
liveness probe.
*/
It("should *not* be restarted with a exec \"cat /tmp/health\" liveness probe [Conformance]", func() {
framework.ConformanceIt("should *not* be restarted with a exec \"cat /tmp/health\" liveness probe", func() {
runLivenessTest(f, &v1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: "liveness-exec",
@ -175,7 +175,7 @@ var _ = framework.KubeDescribe("Probing container", func() {
Description: Make sure when http liveness probe fails, the pod should
be restarted.
*/
It("should be restarted with a /healthz http liveness probe [Conformance]", func() {
framework.ConformanceIt("should be restarted with a /healthz http liveness probe ", func() {
runLivenessTest(f, &v1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: "liveness-http",
@ -209,7 +209,7 @@ var _ = framework.KubeDescribe("Probing container", func() {
Description: Make sure when a pod gets restarted, its start count
should increase.
*/
It("should have monotonically increasing restart count [Conformance] [Slow]", func() {
framework.ConformanceIt("should have monotonically increasing restart count [Slow]", func() {
runLivenessTest(f, &v1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: "liveness-http",
@ -242,7 +242,7 @@ var _ = framework.KubeDescribe("Probing container", func() {
Description: Make sure when http liveness probe succeeds, the pod
should not be restarted.
*/
It("should *not* be restarted with a /healthz http liveness probe [Conformance]", func() {
framework.ConformanceIt("should *not* be restarted with a /healthz http liveness probe ", func() {
runLivenessTest(f, &v1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: "liveness-http",
@ -276,7 +276,7 @@ var _ = framework.KubeDescribe("Probing container", func() {
Description: Make sure that the pod is restarted with a docker exec
liveness probe with timeout.
*/
It("should be restarted with a docker exec liveness probe with timeout [Conformance]", func() {
framework.ConformanceIt("should be restarted with a docker exec liveness probe with timeout ", func() {
// TODO: enable this test once the default exec handler supports timeout.
framework.Skipf("The default exec handler, dockertools.NativeExecHandler, does not support timeouts due to a limitation in the Docker Remote API")
runLivenessTest(f, &v1.Pod{

View File

@ -22,20 +22,18 @@ import (
"k8s.io/apimachinery/pkg/util/uuid"
"k8s.io/kubernetes/test/e2e/framework"
imageutils "k8s.io/kubernetes/test/utils/image"
. "github.com/onsi/ginkgo"
)
var _ = framework.KubeDescribe("Docker Containers", func() {
f := framework.NewDefaultFramework("containers")
It("should use the image defaults if command and args are blank [Conformance]", func() {
framework.ConformanceIt("should use the image defaults if command and args are blank ", func() {
f.TestContainerOutput("use defaults", entrypointTestPod(), 0, []string{
"[/ep default arguments]",
})
})
It("should be able to override the image's default arguments (docker cmd) [Conformance]", func() {
framework.ConformanceIt("should be able to override the image's default arguments (docker cmd) ", func() {
pod := entrypointTestPod()
pod.Spec.Containers[0].Args = []string{"override", "arguments"}
@ -46,7 +44,7 @@ var _ = framework.KubeDescribe("Docker Containers", func() {
// Note: when you override the entrypoint, the image's arguments (docker cmd)
// are ignored.
It("should be able to override the image's default commmand (docker entrypoint) [Conformance]", func() {
framework.ConformanceIt("should be able to override the image's default commmand (docker entrypoint) ", func() {
pod := entrypointTestPod()
pod.Spec.Containers[0].Command = []string{"/ep-2"}
@ -55,7 +53,7 @@ var _ = framework.KubeDescribe("Docker Containers", func() {
})
})
It("should be able to override the image's default command and arguments [Conformance]", func() {
framework.ConformanceIt("should be able to override the image's default command and arguments ", func() {
pod := entrypointTestPod()
pod.Spec.Containers[0].Command = []string{"/ep-2"}
pod.Spec.Containers[0].Args = []string{"override", "arguments"}

View File

@ -37,7 +37,7 @@ var (
var _ = Describe("[sig-api-machinery] Downward API", func() {
f := framework.NewDefaultFramework("downward-api")
It("should provide pod name and namespace as env vars [Conformance]", func() {
framework.ConformanceIt("should provide pod name and namespace as env vars ", func() {
podName := "downward-api-" + string(uuid.NewUUID())
env := []v1.EnvVar{
{
@ -68,7 +68,7 @@ var _ = Describe("[sig-api-machinery] Downward API", func() {
testDownwardAPI(f, podName, env, expectations)
})
It("should provide pod IP as an env var [Conformance]", func() {
framework.ConformanceIt("should provide pod IP as an env var ", func() {
podName := "downward-api-" + string(uuid.NewUUID())
env := []v1.EnvVar{
{
@ -89,7 +89,7 @@ var _ = Describe("[sig-api-machinery] Downward API", func() {
testDownwardAPI(f, podName, env, expectations)
})
It("should provide host IP as an env var [Conformance]", func() {
framework.ConformanceIt("should provide host IP as an env var ", func() {
framework.SkipUnlessServerVersionGTE(hostIPVersion, f.ClientSet.Discovery())
podName := "downward-api-" + string(uuid.NewUUID())
env := []v1.EnvVar{
@ -111,7 +111,7 @@ var _ = Describe("[sig-api-machinery] Downward API", func() {
testDownwardAPI(f, podName, env, expectations)
})
It("should provide container's limits.cpu/memory and requests.cpu/memory as env vars [Conformance]", func() {
framework.ConformanceIt("should provide container's limits.cpu/memory and requests.cpu/memory as env vars ", func() {
podName := "downward-api-" + string(uuid.NewUUID())
env := []v1.EnvVar{
{
@ -157,7 +157,7 @@ var _ = Describe("[sig-api-machinery] Downward API", func() {
testDownwardAPI(f, podName, env, expectations)
})
It("should provide default limits.cpu/memory from node allocatable [Conformance]", func() {
framework.ConformanceIt("should provide default limits.cpu/memory from node allocatable ", func() {
podName := "downward-api-" + string(uuid.NewUUID())
env := []v1.EnvVar{
{
@ -202,7 +202,7 @@ var _ = Describe("[sig-api-machinery] Downward API", func() {
testDownwardAPIUsingPod(f, pod, env, expectations)
})
It("should provide pod UID as env vars [Conformance]", func() {
framework.ConformanceIt("should provide pod UID as env vars ", func() {
framework.SkipUnlessServerVersionGTE(podUIDVersion, f.ClientSet.Discovery())
podName := "downward-api-" + string(uuid.NewUUID())
env := []v1.EnvVar{

View File

@ -39,7 +39,7 @@ var _ = Describe("[sig-storage] Downward API volume", func() {
podClient = f.PodClient()
})
It("should provide podname only [Conformance]", func() {
framework.ConformanceIt("should provide podname only ", func() {
podName := "downwardapi-volume-" + string(uuid.NewUUID())
pod := downwardAPIVolumePodForSimpleTest(podName, "/etc/podname")
@ -48,7 +48,7 @@ var _ = Describe("[sig-storage] Downward API volume", func() {
})
})
It("should set DefaultMode on files [Conformance]", func() {
framework.ConformanceIt("should set DefaultMode on files ", func() {
podName := "downwardapi-volume-" + string(uuid.NewUUID())
defaultMode := int32(0400)
pod := downwardAPIVolumePodForModeTest(podName, "/etc/podname", nil, &defaultMode)
@ -58,7 +58,7 @@ var _ = Describe("[sig-storage] Downward API volume", func() {
})
})
It("should set mode on item file [Conformance]", func() {
framework.ConformanceIt("should set mode on item file ", func() {
podName := "downwardapi-volume-" + string(uuid.NewUUID())
mode := int32(0400)
pod := downwardAPIVolumePodForModeTest(podName, "/etc/podname", &mode, nil)
@ -97,7 +97,7 @@ var _ = Describe("[sig-storage] Downward API volume", func() {
})
})
It("should update labels on modification [Conformance]", func() {
framework.ConformanceIt("should update labels on modification ", func() {
labels := map[string]string{}
labels["key1"] = "value1"
labels["key2"] = "value2"
@ -124,7 +124,7 @@ var _ = Describe("[sig-storage] Downward API volume", func() {
podLogTimeout, framework.Poll).Should(ContainSubstring("key3=\"value3\"\n"))
})
It("should update annotations on modification [Conformance]", func() {
framework.ConformanceIt("should update annotations on modification ", func() {
annotations := map[string]string{}
annotations["builder"] = "bar"
podName := "annotationupdate" + string(uuid.NewUUID())
@ -153,7 +153,7 @@ var _ = Describe("[sig-storage] Downward API volume", func() {
podLogTimeout, framework.Poll).Should(ContainSubstring("builder=\"foo\"\n"))
})
It("should provide container's cpu limit [Conformance]", func() {
framework.ConformanceIt("should provide container's cpu limit ", func() {
podName := "downwardapi-volume-" + string(uuid.NewUUID())
pod := downwardAPIVolumeForContainerResources(podName, "/etc/cpu_limit")
@ -162,7 +162,7 @@ var _ = Describe("[sig-storage] Downward API volume", func() {
})
})
It("should provide container's memory limit [Conformance]", func() {
framework.ConformanceIt("should provide container's memory limit ", func() {
podName := "downwardapi-volume-" + string(uuid.NewUUID())
pod := downwardAPIVolumeForContainerResources(podName, "/etc/memory_limit")
@ -171,7 +171,7 @@ var _ = Describe("[sig-storage] Downward API volume", func() {
})
})
It("should provide container's cpu request [Conformance]", func() {
framework.ConformanceIt("should provide container's cpu request ", func() {
podName := "downwardapi-volume-" + string(uuid.NewUUID())
pod := downwardAPIVolumeForContainerResources(podName, "/etc/cpu_request")
@ -180,7 +180,7 @@ var _ = Describe("[sig-storage] Downward API volume", func() {
})
})
It("should provide container's memory request [Conformance]", func() {
framework.ConformanceIt("should provide container's memory request ", func() {
podName := "downwardapi-volume-" + string(uuid.NewUUID())
pod := downwardAPIVolumeForContainerResources(podName, "/etc/memory_request")
@ -189,14 +189,14 @@ var _ = Describe("[sig-storage] Downward API volume", func() {
})
})
It("should provide node allocatable (cpu) as default cpu limit if the limit is not set [Conformance]", func() {
framework.ConformanceIt("should provide node allocatable (cpu) as default cpu limit if the limit is not set ", func() {
podName := "downwardapi-volume-" + string(uuid.NewUUID())
pod := downwardAPIVolumeForDefaultContainerResources(podName, "/etc/cpu_limit")
f.TestContainerOutputRegexp("downward API volume plugin", pod, 0, []string{"[1-9]"})
})
It("should provide node allocatable (memory) as default memory limit if the limit is not set [Conformance]", func() {
framework.ConformanceIt("should provide node allocatable (memory) as default memory limit if the limit is not set ", func() {
podName := "downwardapi-volume-" + string(uuid.NewUUID())
pod := downwardAPIVolumeForDefaultContainerResources(podName, "/etc/memory_limit")

View File

@ -68,59 +68,59 @@ var _ = framework.KubeDescribe("EmptyDir volumes", func() {
})
})
It("volume on tmpfs should have the correct mode [Conformance] [sig-storage]", func() {
framework.ConformanceIt("volume on tmpfs should have the correct mode [sig-storage]", func() {
doTestVolumeMode(f, testImageRootUid, v1.StorageMediumMemory)
})
It("should support (root,0644,tmpfs) [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should support (root,0644,tmpfs) [sig-storage]", func() {
doTest0644(f, testImageRootUid, v1.StorageMediumMemory)
})
It("should support (root,0666,tmpfs) [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should support (root,0666,tmpfs) [sig-storage]", func() {
doTest0666(f, testImageRootUid, v1.StorageMediumMemory)
})
It("should support (root,0777,tmpfs) [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should support (root,0777,tmpfs) [sig-storage]", func() {
doTest0777(f, testImageRootUid, v1.StorageMediumMemory)
})
It("should support (non-root,0644,tmpfs) [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should support (non-root,0644,tmpfs) [sig-storage]", func() {
doTest0644(f, testImageNonRootUid, v1.StorageMediumMemory)
})
It("should support (non-root,0666,tmpfs) [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should support (non-root,0666,tmpfs) [sig-storage]", func() {
doTest0666(f, testImageNonRootUid, v1.StorageMediumMemory)
})
It("should support (non-root,0777,tmpfs) [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should support (non-root,0777,tmpfs) [sig-storage]", func() {
doTest0777(f, testImageNonRootUid, v1.StorageMediumMemory)
})
It("volume on default medium should have the correct mode [Conformance] [sig-storage]", func() {
framework.ConformanceIt("volume on default medium should have the correct mode [sig-storage]", func() {
doTestVolumeMode(f, testImageRootUid, v1.StorageMediumDefault)
})
It("should support (root,0644,default) [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should support (root,0644,default) [sig-storage]", func() {
doTest0644(f, testImageRootUid, v1.StorageMediumDefault)
})
It("should support (root,0666,default) [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should support (root,0666,default) [sig-storage]", func() {
doTest0666(f, testImageRootUid, v1.StorageMediumDefault)
})
It("should support (root,0777,default) [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should support (root,0777,default) [sig-storage]", func() {
doTest0777(f, testImageRootUid, v1.StorageMediumDefault)
})
It("should support (non-root,0644,default) [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should support (non-root,0644,default) [sig-storage]", func() {
doTest0644(f, testImageNonRootUid, v1.StorageMediumDefault)
})
It("should support (non-root,0666,default) [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should support (non-root,0666,default) [sig-storage]", func() {
doTest0666(f, testImageNonRootUid, v1.StorageMediumDefault)
})
It("should support (non-root,0777,default) [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should support (non-root,0777,default) [sig-storage]", func() {
doTest0777(f, testImageNonRootUid, v1.StorageMediumDefault)
})
})

View File

@ -21,8 +21,6 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/uuid"
"k8s.io/kubernetes/test/e2e/framework"
. "github.com/onsi/ginkgo"
)
// These tests exercise the Kubernetes expansion syntax $(VAR).
@ -36,7 +34,7 @@ var _ = framework.KubeDescribe("Variable Expansion", func() {
Description: Make sure environment variables can be set using an
expansion of previously defined environment variables
*/
It("should allow composing env vars into new env vars [Conformance]", func() {
framework.ConformanceIt("should allow composing env vars into new env vars ", func() {
podName := "var-expansion-" + string(uuid.NewUUID())
pod := &v1.Pod{
ObjectMeta: metav1.ObjectMeta{
@ -81,7 +79,7 @@ var _ = framework.KubeDescribe("Variable Expansion", func() {
Description: Make sure a container's commands can be set using an
expansion of environment variables.
*/
It("should allow substituting values in a container's command [Conformance]", func() {
framework.ConformanceIt("should allow substituting values in a container's command ", func() {
podName := "var-expansion-" + string(uuid.NewUUID())
pod := &v1.Pod{
ObjectMeta: metav1.ObjectMeta{
@ -116,7 +114,7 @@ var _ = framework.KubeDescribe("Variable Expansion", func() {
Description: Make sure a container's args can be set using an
expansion of environment variables.
*/
It("should allow substituting values in a container's args [Conformance]", func() {
framework.ConformanceIt("should allow substituting values in a container's args ", func() {
podName := "var-expansion-" + string(uuid.NewUUID())
pod := &v1.Pod{
ObjectMeta: metav1.ObjectMeta{

View File

@ -40,7 +40,7 @@ var _ = framework.KubeDescribe("HostPath", func() {
_ = os.Remove("/tmp/test-file")
})
It("should give a volume the correct mode [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should give a volume the correct mode [sig-storage]", func() {
source := &v1.HostPathVolumeSource{
Path: "/tmp",
}

View File

@ -48,7 +48,7 @@ var _ = framework.KubeDescribe("KubeletManagedEtcHosts", func() {
f: f,
}
It("should test kubelet managed /etc/hosts file [Conformance]", func() {
framework.ConformanceIt("should test kubelet managed /etc/hosts file ", func() {
By("Setting up the test")
config.setup()

View File

@ -35,7 +35,7 @@ var _ = Describe("[sig-network] Networking", func() {
Description: Try to hit test endpoints from a test container and make
sure each of them can report a unique hostname.
*/
It("should function for intra-pod communication: http [Conformance]", func() {
framework.ConformanceIt("should function for intra-pod communication: http ", func() {
config := framework.NewCoreNetworkingTestConfig(f)
for _, endpointPod := range config.EndpointPods {
config.DialFromTestContainer("http", endpointPod.Status.PodIP, framework.EndpointHttpPort, config.MaxTries, 0, sets.NewString(endpointPod.Name))
@ -47,7 +47,7 @@ var _ = Describe("[sig-network] Networking", func() {
Description: Try to hit test endpoints from a test container using udp
and make sure each of them can report a unique hostname.
*/
It("should function for intra-pod communication: udp [Conformance]", func() {
framework.ConformanceIt("should function for intra-pod communication: udp ", func() {
config := framework.NewCoreNetworkingTestConfig(f)
for _, endpointPod := range config.EndpointPods {
config.DialFromTestContainer("udp", endpointPod.Status.PodIP, framework.EndpointUdpPort, config.MaxTries, 0, sets.NewString(endpointPod.Name))
@ -59,7 +59,7 @@ var _ = Describe("[sig-network] Networking", func() {
Description: Try to hit test endpoints from the pod and make sure each
of them can report a unique hostname.
*/
It("should function for node-pod communication: http [Conformance]", func() {
framework.ConformanceIt("should function for node-pod communication: http ", func() {
config := framework.NewCoreNetworkingTestConfig(f)
for _, endpointPod := range config.EndpointPods {
config.DialFromNode("http", endpointPod.Status.PodIP, framework.EndpointHttpPort, config.MaxTries, 0, sets.NewString(endpointPod.Name))
@ -71,7 +71,7 @@ var _ = Describe("[sig-network] Networking", func() {
Description: Try to hit test endpoints from the pod using udp and make sure
each of them can report a unique hostname.
*/
It("should function for node-pod communication: udp [Conformance]", func() {
framework.ConformanceIt("should function for node-pod communication: udp ", func() {
config := framework.NewCoreNetworkingTestConfig(f)
for _, endpointPod := range config.EndpointPods {
config.DialFromNode("udp", endpointPod.Status.PodIP, framework.EndpointUdpPort, config.MaxTries, 0, sets.NewString(endpointPod.Name))

View File

@ -133,7 +133,7 @@ var _ = framework.KubeDescribe("Pods", func() {
Description: Make sure when a pod is created that it is assigned a host IP
Address.
*/
It("should get a host IP [Conformance]", func() {
framework.ConformanceIt("should get a host IP ", func() {
name := "pod-hostip-" + string(uuid.NewUUID())
testHostIP(podClient, &v1.Pod{
ObjectMeta: metav1.ObjectMeta{
@ -155,7 +155,7 @@ var _ = framework.KubeDescribe("Pods", func() {
Description: Makes sure a pod is created, a watch can be setup for the pod,
pod creation was observed, pod is deleted, and pod deletion is observed.
*/
It("should be submitted and removed [Conformance]", func() {
framework.ConformanceIt("should be submitted and removed ", func() {
By("creating the pod")
name := "pod-submit-remove-" + string(uuid.NewUUID())
value := strconv.Itoa(time.Now().Nanosecond())
@ -280,7 +280,7 @@ var _ = framework.KubeDescribe("Pods", func() {
Testname: pods-updated-successfully
Description: Make sure it is possible to successfully update a pod's labels.
*/
It("should be updated [Conformance]", func() {
framework.ConformanceIt("should be updated ", func() {
By("creating the pod")
name := "pod-update-" + string(uuid.NewUUID())
value := strconv.Itoa(time.Now().Nanosecond())
@ -335,7 +335,7 @@ var _ = framework.KubeDescribe("Pods", func() {
activeDeadlineSecondsValue, and then waits for the deadline to pass
and verifies the pod is terminated.
*/
It("should allow activeDeadlineSeconds to be updated [Conformance]", func() {
framework.ConformanceIt("should allow activeDeadlineSeconds to be updated ", func() {
By("creating the pod")
name := "pod-update-activedeadlineseconds-" + string(uuid.NewUUID())
value := strconv.Itoa(time.Now().Nanosecond())
@ -381,7 +381,7 @@ var _ = framework.KubeDescribe("Pods", func() {
Description: Make sure that when a pod is created it contains environment
variables for each active service.
*/
It("should contain environment variables for services [Conformance]", func() {
framework.ConformanceIt("should contain environment variables for services ", func() {
// Make a pod that will be a service.
// This pod serves its hostname via HTTP.
serverName := "server-envvars-" + string(uuid.NewUUID())

View File

@ -39,7 +39,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Testname: projected-secret-no-defaultMode
Description: Simple projected Secret test with no defaultMode set.
*/
It("should be consumable from pods in volume [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should be consumable from pods in volume [sig-storage]", func() {
doProjectedSecretE2EWithoutMapping(f, nil /* default mode */, "projected-secret-test-"+string(uuid.NewUUID()), nil, nil)
})
@ -47,7 +47,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Testname: projected-secret-with-defaultMode
Description: Simple projected Secret test with defaultMode set.
*/
It("should be consumable from pods in volume with defaultMode set [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should be consumable from pods in volume with defaultMode set [sig-storage]", func() {
defaultMode := int32(0400)
doProjectedSecretE2EWithoutMapping(f, &defaultMode, "projected-secret-test-"+string(uuid.NewUUID()), nil, nil)
})
@ -57,7 +57,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Description: Simple projected Secret test as non-root with
defaultMode and fsGroup set.
*/
It("should be consumable from pods in volume as non-root with defaultMode and fsGroup set [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should be consumable from pods in volume as non-root with defaultMode and fsGroup set [sig-storage]", func() {
defaultMode := int32(0440) /* setting fsGroup sets mode to at least 440 */
fsGroup := int64(1001)
uid := int64(1000)
@ -70,7 +70,7 @@ var _ = framework.KubeDescribe("Projected", func() {
mounting it to a volume with a custom path (mapping) on the pod with
no other settings and make sure the pod actually consumes it.
*/
It("should be consumable from pods in volume with mappings [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should be consumable from pods in volume with mappings [sig-storage]", func() {
doProjectedSecretE2EWithMapping(f, nil)
})
@ -79,7 +79,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Description: Repeat the projected-secret-simple-mapped but this time
with an item mode (e.g. 0400) for the secret map item.
*/
It("should be consumable from pods in volume with mappings and Item Mode set [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should be consumable from pods in volume with mappings and Item Mode set [sig-storage]", func() {
mode := int32(0400)
doProjectedSecretE2EWithMapping(f, &mode)
})
@ -110,7 +110,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Description: Make sure secrets works when mounted as two different
volumes on the same node.
*/
It("should be consumable in multiple volumes in a pod [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should be consumable in multiple volumes in a pod [sig-storage]", func() {
// This test ensures that the same secret can be mounted in multiple
// volumes in the same pod. This test case exists to prevent
// regressions that break this use-case.
@ -203,7 +203,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Testname: projected-secret-simple-optional
Description: Make sure secrets works when optional updates included.
*/
It("optional updates should be reflected in volume [Conformance] [sig-storage]", func() {
framework.ConformanceIt("optional updates should be reflected in volume [sig-storage]", func() {
podLogTimeout := framework.GetPodSecretUpdateTimeout(f.ClientSet)
containerTimeoutArg := fmt.Sprintf("--retry_time=%v", int(podLogTimeout.Seconds()))
trueVal := true
@ -405,7 +405,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Description: Make sure that a projected volume with a configMap with
no mappings succeeds properly.
*/
It("should be consumable from pods in volume [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should be consumable from pods in volume [sig-storage]", func() {
doProjectedConfigMapE2EWithoutMappings(f, 0, 0, nil)
})
@ -414,7 +414,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Description: Make sure that a projected volume configMap is consumable
with defaultMode set.
*/
It("should be consumable from pods in volume with defaultMode set [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should be consumable from pods in volume with defaultMode set [sig-storage]", func() {
defaultMode := int32(0400)
doProjectedConfigMapE2EWithoutMappings(f, 0, 0, &defaultMode)
})
@ -429,7 +429,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Description: Make sure that a projected volume configMap is consumable
by a non-root userID.
*/
It("should be consumable from pods in volume as non-root [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should be consumable from pods in volume as non-root [sig-storage]", func() {
doProjectedConfigMapE2EWithoutMappings(f, 1000, 0, nil)
})
@ -443,7 +443,7 @@ var _ = framework.KubeDescribe("Projected", func() {
map and mounting it to a volume with a custom path (mapping) on the
pod with no other settings and make sure the pod actually consumes it.
*/
It("should be consumable from pods in volume with mappings [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should be consumable from pods in volume with mappings [sig-storage]", func() {
doProjectedConfigMapE2EWithMappings(f, 0, 0, nil)
})
@ -452,7 +452,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Description: Repeat the projected-secret-simple-mapped but this time
with an item mode (e.g. 0400) for the secret map item
*/
It("should be consumable from pods in volume with mappings and Item mode set[Conformance] [sig-storage]", func() {
framework.ConformanceIt("should be consumable from pods in volume with mappings and Item mode set [sig-storage]", func() {
mode := int32(0400)
doProjectedConfigMapE2EWithMappings(f, 0, 0, &mode)
})
@ -462,7 +462,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Description: Repeat the projected-config-map-simple-mapped but this
time with a user other than root.
*/
It("should be consumable from pods in volume with mappings as non-root [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should be consumable from pods in volume with mappings as non-root [sig-storage]", func() {
doProjectedConfigMapE2EWithMappings(f, 1000, 0, nil)
})
@ -476,7 +476,7 @@ var _ = framework.KubeDescribe("Projected", func() {
that the values in these configMaps can be updated, deleted,
and created.
*/
It("updates should be reflected in volume [Conformance] [sig-storage]", func() {
framework.ConformanceIt("updates should be reflected in volume [sig-storage]", func() {
podLogTimeout := framework.GetPodSecretUpdateTimeout(f.ClientSet)
containerTimeoutArg := fmt.Sprintf("--retry_time=%v", int(podLogTimeout.Seconds()))
@ -565,7 +565,7 @@ var _ = framework.KubeDescribe("Projected", func() {
configMaps, that the values in these configMaps can be updated,
deleted, and created.
*/
It("optional updates should be reflected in volume [Conformance] [sig-storage]", func() {
framework.ConformanceIt("optional updates should be reflected in volume [sig-storage]", func() {
podLogTimeout := framework.GetPodSecretUpdateTimeout(f.ClientSet)
containerTimeoutArg := fmt.Sprintf("--retry_time=%v", int(podLogTimeout.Seconds()))
trueVal := true
@ -766,7 +766,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Description: Make sure config map works when it mounted as two
different volumes on the same node.
*/
It("should be consumable in multiple volumes in the same pod [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should be consumable in multiple volumes in the same pod [sig-storage]", func() {
var (
name = "projected-configmap-test-volume-" + string(uuid.NewUUID())
volumeName = "projected-configmap-volume"
@ -864,7 +864,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Description: Ensure that downward API can provide pod's name through
DownwardAPIVolumeFiles in a projected volume.
*/
It("should provide podname only [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should provide podname only [sig-storage]", func() {
podName := "downwardapi-volume-" + string(uuid.NewUUID())
pod := downwardAPIVolumePodForSimpleTest(podName, "/etc/podname")
@ -879,7 +879,7 @@ var _ = framework.KubeDescribe("Projected", func() {
mode for DownwardAPIVolumeFiles if no mode is specified in a projected
volume.
*/
It("should set DefaultMode on files [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should set DefaultMode on files [sig-storage]", func() {
podName := "downwardapi-volume-" + string(uuid.NewUUID())
defaultMode := int32(0400)
pod := projectedDownwardAPIVolumePodForModeTest(podName, "/etc/podname", nil, &defaultMode)
@ -894,7 +894,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Description: Ensure that downward API can set file premission mode for
DownwardAPIVolumeFiles in a projected volume.
*/
It("should set mode on item file [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should set mode on item file [sig-storage]", func() {
podName := "downwardapi-volume-" + string(uuid.NewUUID())
mode := int32(0400)
pod := projectedDownwardAPIVolumePodForModeTest(podName, "/etc/podname", &mode, nil)
@ -939,7 +939,7 @@ var _ = framework.KubeDescribe("Projected", func() {
DownwardAPIVolumeFiles when pod's labels get modified in a projected
volume.
*/
It("should update labels on modification [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should update labels on modification [sig-storage]", func() {
labels := map[string]string{}
labels["key1"] = "value1"
labels["key2"] = "value2"
@ -972,7 +972,7 @@ var _ = framework.KubeDescribe("Projected", func() {
DownwardAPIVolumeFiles when pod's annotations get modified in a
projected volume.
*/
It("should update annotations on modification [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should update annotations on modification [sig-storage]", func() {
annotations := map[string]string{}
annotations["builder"] = "bar"
podName := "annotationupdate" + string(uuid.NewUUID())
@ -1006,7 +1006,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Description: Ensure that downward API can provide container's CPU
limit through DownwardAPIVolumeFiles in a projected volume.
*/
It("should provide container's cpu limit [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should provide container's cpu limit [sig-storage]", func() {
podName := "downwardapi-volume-" + string(uuid.NewUUID())
pod := downwardAPIVolumeForContainerResources(podName, "/etc/cpu_limit")
@ -1020,7 +1020,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Description: Ensure that downward API can provide container's memory
limit through DownwardAPIVolumeFiles in a projected volume.
*/
It("should provide container's memory limit [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should provide container's memory limit [sig-storage]", func() {
podName := "downwardapi-volume-" + string(uuid.NewUUID())
pod := downwardAPIVolumeForContainerResources(podName, "/etc/memory_limit")
@ -1034,7 +1034,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Description: Ensure that downward API can provide container's CPU
request through DownwardAPIVolumeFiles in a projected volume.
*/
It("should provide container's cpu request [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should provide container's cpu request [sig-storage]", func() {
podName := "downwardapi-volume-" + string(uuid.NewUUID())
pod := downwardAPIVolumeForContainerResources(podName, "/etc/cpu_request")
@ -1048,7 +1048,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Description: Ensure that downward API can provide container's memory
request through DownwardAPIVolumeFiles in a projected volume.
*/
It("should provide container's memory request [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should provide container's memory request [sig-storage]", func() {
podName := "downwardapi-volume-" + string(uuid.NewUUID())
pod := downwardAPIVolumeForContainerResources(podName, "/etc/memory_request")
@ -1063,7 +1063,7 @@ var _ = framework.KubeDescribe("Projected", func() {
allocatable value for CPU through DownwardAPIVolumeFiles if CPU limit
is not specified for a container in a projected volume.
*/
It("should provide node allocatable (cpu) as default cpu limit if the limit is not set [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should provide node allocatable (cpu) as default cpu limit if the limit is not set [sig-storage]", func() {
podName := "downwardapi-volume-" + string(uuid.NewUUID())
pod := downwardAPIVolumeForDefaultContainerResources(podName, "/etc/cpu_limit")
@ -1076,7 +1076,7 @@ var _ = framework.KubeDescribe("Projected", func() {
allocatable value for memory through DownwardAPIVolumeFiles if memory
limit is not specified for a container in a projected volume.
*/
It("should provide node allocatable (memory) as default memory limit if the limit is not set [Conformance] [sig-storage]", func() {
framework.ConformanceIt("should provide node allocatable (memory) as default memory limit if the limit is not set [sig-storage]", func() {
podName := "downwardapi-volume-" + string(uuid.NewUUID())
pod := downwardAPIVolumeForDefaultContainerResources(podName, "/etc/memory_limit")
@ -1089,7 +1089,7 @@ var _ = framework.KubeDescribe("Projected", func() {
Description: This test projects a secret and configmap into the same
directory to ensure projection is working as intended.
*/
It("should project all components that make up the projection API [Conformance] [sig-storage] [Projection]", func() {
framework.ConformanceIt("should project all components that make up the projection API [sig-storage] [Projection]", func() {
var err error
podName := "projected-volume-" + string(uuid.NewUUID())
secretName := "secret-projected-all-test-volume-" + string(uuid.NewUUID())

View File

@ -35,7 +35,7 @@ var _ = Describe("[sig-api-machinery] Secrets", func() {
Description: Ensure that secret can be consumed via environment
variables.
*/
It("should be consumable from pods in env vars [Conformance]", func() {
framework.ConformanceIt("should be consumable from pods in env vars ", func() {
name := "secret-test-" + string(uuid.NewUUID())
secret := secretForTest(f.Namespace.Name, name)
@ -84,7 +84,7 @@ var _ = Describe("[sig-api-machinery] Secrets", func() {
Description: Ensure that secret can be consumed via source of a set
of ConfigMaps.
*/
It("should be consumable via the environment [Conformance]", func() {
framework.ConformanceIt("should be consumable via the environment ", func() {
name := "secret-test-" + string(uuid.NewUUID())
secret := newEnvFromSecret(f.Namespace.Name, name)
By(fmt.Sprintf("creating secret %v/%v", f.Namespace.Name, secret.Name))

View File

@ -38,7 +38,7 @@ var _ = Describe("[sig-storage] Secrets", func() {
Description: Ensure that secret can be mounted without mapping to a
pod volume.
*/
It("should be consumable from pods in volume [Conformance]", func() {
framework.ConformanceIt("should be consumable from pods in volume ", func() {
doSecretE2EWithoutMapping(f, nil /* default mode */, "secret-test-"+string(uuid.NewUUID()), nil, nil)
})
@ -47,7 +47,7 @@ var _ = Describe("[sig-storage] Secrets", func() {
Description: Ensure that secret can be mounted without mapping to a
pod volume in default mode.
*/
It("should be consumable from pods in volume with defaultMode set [Conformance]", func() {
framework.ConformanceIt("should be consumable from pods in volume with defaultMode set ", func() {
defaultMode := int32(0400)
doSecretE2EWithoutMapping(f, &defaultMode, "secret-test-"+string(uuid.NewUUID()), nil, nil)
})
@ -57,7 +57,7 @@ var _ = Describe("[sig-storage] Secrets", func() {
Description: Ensure that secret can be mounted without mapping to a pod
volume as non-root in default mode with fsGroup set.
*/
It("should be consumable from pods in volume as non-root with defaultMode and fsGroup set [Conformance]", func() {
framework.ConformanceIt("should be consumable from pods in volume as non-root with defaultMode and fsGroup set ", func() {
defaultMode := int32(0440) /* setting fsGroup sets mode to at least 440 */
fsGroup := int64(1001)
uid := int64(1000)
@ -69,7 +69,7 @@ var _ = Describe("[sig-storage] Secrets", func() {
Description: Ensure that secret can be mounted with mapping to a pod
volume.
*/
It("should be consumable from pods in volume with mappings [Conformance]", func() {
framework.ConformanceIt("should be consumable from pods in volume with mappings ", func() {
doSecretE2EWithMapping(f, nil)
})
@ -78,7 +78,7 @@ var _ = Describe("[sig-storage] Secrets", func() {
Description: Ensure that secret can be mounted with mapping to a pod
volume in item mode.
*/
It("should be consumable from pods in volume with mappings and Item Mode set [Conformance]", func() {
framework.ConformanceIt("should be consumable from pods in volume with mappings and Item Mode set ", func() {
mode := int32(0400)
doSecretE2EWithMapping(f, &mode)
})
@ -108,7 +108,7 @@ var _ = Describe("[sig-storage] Secrets", func() {
Testname: secret-multiple-volume-mounts
Description: Ensure that secret can be mounted to multiple pod volumes.
*/
It("should be consumable in multiple volumes in a pod [Conformance]", func() {
framework.ConformanceIt("should be consumable in multiple volumes in a pod ", func() {
// This test ensures that the same secret can be mounted in multiple
// volumes in the same pod. This test case exists to prevent
// regressions that break this use-case.
@ -186,7 +186,7 @@ var _ = Describe("[sig-storage] Secrets", func() {
Description: Ensure that optional update change to secret can be
reflected on a mounted volume.
*/
It("optional updates should be reflected in volume [Conformance]", func() {
framework.ConformanceIt("optional updates should be reflected in volume ", func() {
podLogTimeout := framework.GetPodSecretUpdateTimeout(f.ClientSet)
containerTimeoutArg := fmt.Sprintf("--retry_time=%v", int(podLogTimeout.Seconds()))
trueVal := true

View File

@ -36,7 +36,7 @@ import (
var _ = framework.KubeDescribe("Events", func() {
f := framework.NewDefaultFramework("events")
It("should be sent by kubelets and the scheduler about pods scheduling and running [Conformance]", func() {
framework.ConformanceIt("should be sent by kubelets and the scheduler about pods scheduling and running ", func() {
podClient := f.ClientSet.CoreV1().Pods(f.Namespace.Name)

View File

@ -634,6 +634,11 @@ func KubeDescribe(text string, body func()) bool {
return Describe("[k8s.io] "+text, body)
}
// Wrapper function for ginkgo It. Adds "[Conformance]" tag and makes static analysis easier.
func ConformanceIt(text string, body interface{}, timeout ...float64) bool {
return It(text+" [Conformance]", body, timeout...)
}
// PodStateVerification represents a verification of pod state.
// Any time you have a set of pods that you want to operate against or query,
// this struct can be used to declaratively identify those pods.

View File

@ -305,7 +305,7 @@ var _ = SIGDescribe("Kubectl client", func() {
nautilus = substituteImageName(string(generated.ReadOrDie(filepath.Join(updateDemoRoot, "nautilus-rc.yaml.in"))))
kitten = substituteImageName(string(generated.ReadOrDie(filepath.Join(updateDemoRoot, "kitten-rc.yaml.in"))))
})
It("should create and stop a replication controller [Conformance]", func() {
framework.ConformanceIt("should create and stop a replication controller ", func() {
defer cleanupKubectlInputs(nautilus, ns, updateDemoSelector)
By("creating a replication controller")
@ -313,7 +313,7 @@ var _ = SIGDescribe("Kubectl client", func() {
framework.ValidateController(c, nautilusImage, 2, "update-demo", updateDemoSelector, getUDData("nautilus.jpg", ns), ns)
})
It("should scale a replication controller [Conformance]", func() {
framework.ConformanceIt("should scale a replication controller ", func() {
defer cleanupKubectlInputs(nautilus, ns, updateDemoSelector)
By("creating a replication controller")
@ -327,7 +327,7 @@ var _ = SIGDescribe("Kubectl client", func() {
framework.ValidateController(c, nautilusImage, 2, "update-demo", updateDemoSelector, getUDData("nautilus.jpg", ns), ns)
})
It("should do a rolling update of a replication controller [Conformance]", func() {
framework.ConformanceIt("should do a rolling update of a replication controller ", func() {
By("creating the initial replication controller")
framework.RunKubectlOrDieInput(string(nautilus[:]), "create", "-f", "-", fmt.Sprintf("--namespace=%v", ns))
framework.ValidateController(c, nautilusImage, 2, "update-demo", updateDemoSelector, getUDData("nautilus.jpg", ns), ns)
@ -354,7 +354,7 @@ var _ = SIGDescribe("Kubectl client", func() {
}
}
It("should create and stop a working application [Conformance]", func() {
framework.ConformanceIt("should create and stop a working application ", func() {
framework.SkipUnlessServerVersionGTE(deploymentsVersion, c.Discovery())
defer forEachGBFile(func(contents string) {
@ -722,7 +722,7 @@ metadata:
})
framework.KubeDescribe("Kubectl api-versions", func() {
It("should check if v1 is in available api versions [Conformance]", func() {
framework.ConformanceIt("should check if v1 is in available api versions ", func() {
By("validating api versions")
output := framework.RunKubectlOrDie("api-versions")
if !strings.Contains(output, "v1") {
@ -813,7 +813,7 @@ metadata:
})
framework.KubeDescribe("Kubectl cluster-info", func() {
It("should check if Kubernetes master services is included in cluster-info [Conformance]", func() {
framework.ConformanceIt("should check if Kubernetes master services is included in cluster-info ", func() {
By("validating cluster-info")
output := framework.RunKubectlOrDie("cluster-info")
// Can't check exact strings due to terminal control commands (colors)
@ -830,7 +830,7 @@ metadata:
})
framework.KubeDescribe("Kubectl describe", func() {
It("should check if kubectl describe prints relevant information for rc and pods [Conformance]", func() {
framework.ConformanceIt("should check if kubectl describe prints relevant information for rc and pods ", func() {
framework.SkipUnlessServerVersionGTE(nodePortsOptionalVersion, c.Discovery())
kv, err := framework.KubectlVersion()
Expect(err).NotTo(HaveOccurred())
@ -935,7 +935,7 @@ metadata:
})
framework.KubeDescribe("Kubectl expose", func() {
It("should create services for rc [Conformance]", func() {
framework.ConformanceIt("should create services for rc ", func() {
controllerJson := substituteImageName(string(readTestFileOrDie(redisControllerFilename)))
nsFlag := fmt.Sprintf("--namespace=%v", ns)
@ -1026,7 +1026,7 @@ metadata:
cleanupKubectlInputs(podYaml, ns, pausePodSelector)
})
It("should update the label on a resource [Conformance]", func() {
framework.ConformanceIt("should update the label on a resource ", func() {
labelName := "testing-label"
labelValue := "testing-label-value"
@ -1061,7 +1061,7 @@ metadata:
cleanupKubectlInputs(rc, ns, simplePodSelector)
})
It("should be able to retrieve and filter logs [Conformance]", func() {
framework.ConformanceIt("should be able to retrieve and filter logs ", func() {
framework.SkipUnlessServerVersionGTE(extendedPodLogFilterVersion, c.Discovery())
// Split("something\n", "\n") returns ["something", ""], so
@ -1114,7 +1114,7 @@ metadata:
})
framework.KubeDescribe("Kubectl patch", func() {
It("should add annotations for pods in rc [Conformance]", func() {
framework.ConformanceIt("should add annotations for pods in rc ", func() {
controllerJson := substituteImageName(string(readTestFileOrDie(redisControllerFilename)))
nsFlag := fmt.Sprintf("--namespace=%v", ns)
By("creating Redis RC")
@ -1143,7 +1143,7 @@ metadata:
})
framework.KubeDescribe("Kubectl version", func() {
It("should check is all data is printed [Conformance]", func() {
framework.ConformanceIt("should check is all data is printed ", func() {
version := framework.RunKubectlOrDie("version")
requiredItems := []string{"Client Version:", "Server Version:", "Major:", "Minor:", "GitCommit:"}
for _, item := range requiredItems {
@ -1179,7 +1179,7 @@ metadata:
cleanUp()
})
It("should create an rc or deployment from an image [Conformance]", func() {
framework.ConformanceIt("should create an rc or deployment from an image ", func() {
By("running the image " + nginxImage)
framework.RunKubectlOrDie("run", name, "--image="+nginxImage, nsFlag)
By("verifying the pod controlled by " + name + " gets created")
@ -1209,7 +1209,7 @@ metadata:
framework.RunKubectlOrDie("delete", "rc", rcName, nsFlag)
})
It("should create an rc from an image [Conformance]", func() {
framework.ConformanceIt("should create an rc from an image ", func() {
By("running the image " + nginxImage)
framework.RunKubectlOrDie("run", rcName, "--image="+nginxImage, "--generator=run/v1", nsFlag)
By("verifying the rc " + rcName + " was created")
@ -1265,7 +1265,7 @@ metadata:
framework.RunKubectlOrDie("delete", "rc", rcName, nsFlag)
})
It("should support rolling-update to same image [Conformance]", func() {
framework.ConformanceIt("should support rolling-update to same image ", func() {
By("running the image " + nginxImage)
framework.RunKubectlOrDie("run", rcName, "--image="+nginxImage, "--generator=run/v1", nsFlag)
By("verifying the rc " + rcName + " was created")
@ -1309,7 +1309,7 @@ metadata:
Expect(err).NotTo(HaveOccurred())
})
It("should create a deployment from an image [Conformance]", func() {
framework.ConformanceIt("should create a deployment from an image ", func() {
framework.SkipUnlessServerVersionGTE(deploymentsVersion, c.Discovery())
By("running the image " + nginxImage)
@ -1351,7 +1351,7 @@ metadata:
framework.RunKubectlOrDie("delete", "jobs", jobName, nsFlag)
})
It("should create a job from an image when restart is OnFailure [Conformance]", func() {
framework.ConformanceIt("should create a job from an image when restart is OnFailure ", func() {
framework.SkipUnlessServerVersionGTE(jobsVersion, c.Discovery())
By("running the image " + nginxImage)
@ -1421,7 +1421,7 @@ metadata:
framework.RunKubectlOrDie("delete", "pods", podName, nsFlag)
})
It("should create a pod from an image when restart is Never [Conformance]", func() {
framework.ConformanceIt("should create a pod from an image when restart is Never ", func() {
framework.SkipUnlessServerVersionGTE(jobsVersion, c.Discovery())
By("running the image " + nginxImage)
@ -1454,7 +1454,7 @@ metadata:
framework.RunKubectlOrDie("delete", "pods", podName, nsFlag)
})
It("should update a single-container pod's image [Conformance]", func() {
framework.ConformanceIt("should update a single-container pod's image ", func() {
framework.SkipUnlessServerVersionGTE(jobsVersion, c.Discovery())
By("running the image " + nginxImage)
@ -1492,7 +1492,7 @@ metadata:
framework.KubeDescribe("Kubectl run --rm job", func() {
jobName := "e2e-test-rm-busybox-job"
It("should create a job from an image, then delete the job [Conformance]", func() {
framework.ConformanceIt("should create a job from an image, then delete the job ", func() {
nsFlag := fmt.Sprintf("--namespace=%v", ns)
// The rkt runtime doesn't support attach, see #23335
@ -1518,7 +1518,7 @@ metadata:
framework.KubeDescribe("Proxy server", func() {
// TODO: test proxy options (static, prefix, etc)
It("should support proxy with --port 0 [Conformance]", func() {
framework.ConformanceIt("should support proxy with --port 0 ", func() {
By("starting the proxy server")
port, cmd, err := startProxyServer()
if cmd != nil {
@ -1538,7 +1538,7 @@ metadata:
}
})
It("should support --unix-socket=/path [Conformance]", func() {
framework.ConformanceIt("should support --unix-socket=/path ", func() {
By("Starting the proxy")
tmpdir, err := ioutil.TempDir("", "kubectl-proxy-unix")
if err != nil {

View File

@ -284,7 +284,7 @@ func reverseArray(arr []string) []string {
var _ = SIGDescribe("DNS", func() {
f := framework.NewDefaultFramework("dns")
It("should provide DNS for the cluster [Conformance]", func() {
framework.ConformanceIt("should provide DNS for the cluster ", func() {
// All the names we need to be able to resolve.
// TODO: Spin up a separate test service and test that dns works for that service.
namesToResolve := []string{
@ -310,7 +310,7 @@ var _ = SIGDescribe("DNS", func() {
validateDNSResults(f, pod, append(wheezyFileNames, jessieFileNames...))
})
It("should provide DNS for services [Conformance]", func() {
framework.ConformanceIt("should provide DNS for services ", func() {
// Create a test headless service.
By("Creating a test headless service")
testServiceSelector := map[string]string{

View File

@ -67,14 +67,14 @@ var _ = SIGDescribe("Proxy", func() {
Description: Ensure that proxy on node logs works with generic top
level prefix proxy and explicit kubelet port.
*/
It("should proxy logs on node with explicit kubelet port [Conformance]", func() { nodeProxyTest(f, prefix+"/proxy/nodes/", ":10250/logs/") })
framework.ConformanceIt("should proxy logs on node with explicit kubelet port ", func() { nodeProxyTest(f, prefix+"/proxy/nodes/", ":10250/logs/") })
/*
Testname: proxy-prefix-node-logs
Description: Ensure that proxy on node logs works with generic top
level prefix proxy.
*/
It("should proxy logs on node [Conformance]", func() { nodeProxyTest(f, prefix+"/proxy/nodes/", "/logs/") })
framework.ConformanceIt("should proxy logs on node ", func() { nodeProxyTest(f, prefix+"/proxy/nodes/", "/logs/") })
It("should proxy to cadvisor", func() { nodeProxyTest(f, prefix+"/proxy/nodes/", ":4194/containers/") })
/*
@ -82,14 +82,14 @@ var _ = SIGDescribe("Proxy", func() {
Description: Ensure that proxy on node logs works with node proxy
subresource and explicit kubelet port.
*/
It("should proxy logs on node with explicit kubelet port using proxy subresource [Conformance]", func() { nodeProxyTest(f, prefix+"/nodes/", ":10250/proxy/logs/") })
framework.ConformanceIt("should proxy logs on node with explicit kubelet port using proxy subresource ", func() { nodeProxyTest(f, prefix+"/nodes/", ":10250/proxy/logs/") })
/*
Testname: proxy-subresource-node-logs
Description: Ensure that proxy on node logs works with node proxy
subresource.
*/
It("should proxy logs on node using proxy subresource [Conformance]", func() { nodeProxyTest(f, prefix+"/nodes/", "/proxy/logs/") })
framework.ConformanceIt("should proxy logs on node using proxy subresource ", func() { nodeProxyTest(f, prefix+"/nodes/", "/proxy/logs/") })
It("should proxy to cadvisor using proxy subresource", func() { nodeProxyTest(f, prefix+"/nodes/", ":4194/proxy/containers/") })
// using the porter image to serve content, access the content
@ -100,7 +100,7 @@ var _ = SIGDescribe("Proxy", func() {
Description: Ensure that proxy through a service and a pod works with
both generic top level prefix proxy and proxy subresource.
*/
It("should proxy through a service and a pod [Conformance]", func() {
framework.ConformanceIt("should proxy through a service and a pod ", func() {
start := time.Now()
labels := map[string]string{"proxy-service-target": "true"}
service, err := f.ClientSet.CoreV1().Services(f.Namespace.Name).Create(&v1.Service{

View File

@ -69,7 +69,7 @@ var _ = SIGDescribe("Services", func() {
Testname: service-kubernetes-exists
Description: Make sure kubernetes service does exist.
*/
It("should provide secure master service [Conformance]", func() {
framework.ConformanceIt("should provide secure master service ", func() {
_, err := cs.CoreV1().Services(metav1.NamespaceDefault).Get("kubernetes", metav1.GetOptions{})
Expect(err).NotTo(HaveOccurred())
})
@ -79,7 +79,7 @@ var _ = SIGDescribe("Services", func() {
Description: Ensure a service with no pod, one pod or two pods has
valid/accessible endpoints (same port number for service and pods).
*/
It("should serve a basic endpoint from pods [Conformance]", func() {
framework.ConformanceIt("should serve a basic endpoint from pods ", func() {
// TODO: use the ServiceTestJig here
serviceName := "endpoint-test2"
ns := f.Namespace.Name
@ -144,7 +144,7 @@ var _ = SIGDescribe("Services", func() {
Description: Ensure a service with no pod, one pod or two pods has
valid/accessible endpoints (different port number for pods).
*/
It("should serve multiport endpoints from pods [Conformance]", func() {
framework.ConformanceIt("should serve multiport endpoints from pods ", func() {
// TODO: use the ServiceTestJig here
// repacking functionality is intentionally not tested here - it's better to test it in an integration test.
serviceName := "multi-endpoint-test"

View File

@ -51,7 +51,7 @@ var _ = SIGDescribe("Service endpoints latency", func() {
(e.g. p50 < 20 seconds and p99 < 50 seconds). If any call to the
service endpoint fails, the test will also fail.
*/
It("should not be very high [Conformance]", func() {
framework.ConformanceIt("should not be very high ", func() {
const (
// These are very generous criteria. Ideally we will
// get this much lower in the future. See issue

View File

@ -47,7 +47,7 @@ var _ = framework.KubeDescribe("Pods Extended", func() {
podClient = f.PodClient()
})
// Flaky issue #36821.
It("should be submitted and removed [Conformance] [Flaky]", func() {
framework.ConformanceIt("should be submitted and removed [Flaky]", func() {
By("creating the pod")
name := "pod-submit-remove-" + string(uuid.NewUUID())
value := strconv.Itoa(time.Now().Nanosecond())
@ -199,7 +199,7 @@ var _ = framework.KubeDescribe("Pods Extended", func() {
BeforeEach(func() {
podClient = f.PodClient()
})
It("should be submitted and removed [Conformance]", func() {
framework.ConformanceIt("should be submitted and removed ", func() {
By("creating the pod")
name := "pod-qos-class-" + string(uuid.NewUUID())
pod := &v1.Pod{

View File

@ -180,7 +180,7 @@ var _ = framework.KubeDescribe("PreStop", func() {
Description: Makes sure a pod's preStop handler is successfully
invoked immediately before a container is terminated.
*/
It("should call prestop when killing a pod [Conformance]", func() {
framework.ConformanceIt("should call prestop when killing a pod ", func() {
testPreStop(f.ClientSet, f.Namespace.Name)
})
})

View File

@ -242,7 +242,7 @@ var _ = SIGDescribe("SchedulerPredicates [Serial]", func() {
Description: Ensure that scheduler accounts node resources correctly
and respects pods' resource requirements during scheduling.
*/
It("validates resource limits of pods that are allowed to run [Conformance]", func() {
framework.ConformanceIt("validates resource limits of pods that are allowed to run ", func() {
framework.WaitForStableCluster(cs, masterNodes)
nodeMaxAllocatable := int64(0)
nodeToAllocatableMap := make(map[string]int64)
@ -348,7 +348,7 @@ var _ = SIGDescribe("SchedulerPredicates [Serial]", func() {
Description: Ensure that scheduler respects the NodeSelector field of
PodSpec during scheduling (when it does not match any node).
*/
It("validates that NodeSelector is respected if not matching [Conformance]", func() {
framework.ConformanceIt("validates that NodeSelector is respected if not matching ", func() {
By("Trying to schedule Pod with nonempty NodeSelector.")
podName := "restricted-pod"
@ -394,7 +394,7 @@ var _ = SIGDescribe("SchedulerPredicates [Serial]", func() {
Description: Ensure that scheduler respects the NodeSelector field
of PodSpec during scheduling (when it matches).
*/
It("validates that NodeSelector is respected if matching [Conformance]", func() {
framework.ConformanceIt("validates that NodeSelector is respected if matching ", func() {
nodeName := GetNodeThatCanRunPod(f)
By("Trying to apply a random label on the found node.")