Unverified Commit 5ad34ac6 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #53909 from mml/conforgen

Automatic merge from submit-queue (batch tested with PRs 54165, 53909). 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>. Add conformance test test. Add new `test/conformance` subdir, add code to generate a list of conformance tests, and add a test that verifies the list of tests. The intent is to move management of the definition of conformance to sig-architecture. ```release-note NONE ``` ref. #54726
parents 444d0c11 6096d9d4
...@@ -11,6 +11,7 @@ filegroup( ...@@ -11,6 +11,7 @@ filegroup(
name = "all-srcs", name = "all-srcs",
srcs = [ srcs = [
":package-srcs", ":package-srcs",
"//test/conformance:all-srcs",
"//test/e2e:all-srcs", "//test/e2e:all-srcs",
"//test/e2e_node:all-srcs", "//test/e2e_node:all-srcs",
"//test/fixtures:all-srcs", "//test/fixtures:all-srcs",
......
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
go_library(
name = "go_default_library",
srcs = ["walk.go"],
importpath = "k8s.io/kubernetes/test/conformance",
visibility = ["//visibility:private"],
)
go_binary(
name = "conformance",
importpath = "k8s.io/kubernetes/test/conformance",
library = ":go_default_library",
visibility = ["//visibility:public"],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
genrule(
name = "list_conformance_tests",
srcs = ["//test/e2e:all-srcs"],
outs = ["conformance.txt"],
cmd = "./$(location :conformance) $(locations //test/e2e:all-srcs) > $@",
message = "Listing all conformance tests.",
tools = [":conformance"],
)
sh_test(
name = "conformance_test",
srcs = ["conformance_test.sh"],
data = [
"testdata/conformance.txt",
":list_conformance_tests",
],
)
# This is the owner of the test code. The test data itself is owned by sig-architecture.
reviewers:
- mml
- cheftako
approvers:
- mml
- cheftako
#!/bin/bash
# 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.
# echo ${TEST_SRCDIR}
# pwd
# env | grep --color=always test/conformance
# find ${TEST_SRCDIR} -ls | grep --color=always test/conformance
set -o errexit
diff -u test/conformance/testdata/conformance.txt test/conformance/conformance.txt
echo PASS
# To be owned by sig-architecture.
# TODO(mml): Exclude parent owners once
# https://github.com/kubernetes/test-infra/issues/5197 is implemented.
reviewers:
- bgrant0607
- smarterclayton
approvers:
- bgrant0607
- smarterclayton
/*
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 main provides a tool that scans kubernetes e2e test source code
// looking for conformance test declarations, which it emits on stdout. It
// also looks for legacy, manually added "[Conformance]" tags and reports an
// error if it finds any.
//
// This approach is not air tight, but it will serve our purpose as a
// pre-submit check.
package main
import (
"fmt"
"go/ast"
"go/parser"
"go/token"
"os"
"path/filepath"
"strings"
)
type visitor struct {
FileSet *token.FileSet
}
func newVisitor() *visitor {
return &visitor{
FileSet: token.NewFileSet(),
}
}
func (v *visitor) isConformanceCall(call *ast.CallExpr) bool {
switch fun := call.Fun.(type) {
case *ast.SelectorExpr:
if fun.Sel != nil {
return fun.Sel.Name == "ConformanceIt"
}
}
return false
}
func (v *visitor) isLegacyItCall(call *ast.CallExpr) bool {
switch fun := call.Fun.(type) {
case *ast.Ident:
if fun.Name != "It" {
return false
}
if len(call.Args) < 1 {
v.failf(call, "Not enough arguments to It()")
}
default:
return false
}
switch arg := call.Args[0].(type) {
case *ast.BasicLit:
if arg.Kind != token.STRING {
v.failf(arg, "Unexpected non-string argument to It()")
}
if strings.Contains(arg.Value, "[Conformance]") {
return true
}
default:
// non-literal argument to It()... we just ignore these even though they could be a way to "sneak in" a conformance test
}
return false
}
func (v *visitor) failf(expr ast.Expr, format string, a ...interface{}) {
msg := fmt.Sprintf(format, a...)
fmt.Fprintf(os.Stderr, "ERROR at %v: %s\n", v.FileSet.Position(expr.Pos()), msg)
os.Exit(65)
}
func (v *visitor) emit(arg ast.Expr) {
switch at := arg.(type) {
case *ast.BasicLit:
if at.Kind != token.STRING {
v.failf(at, "framework.ConformanceIt() called with non-string argument")
return
}
fmt.Printf("%s: %s\n", v.FileSet.Position(at.Pos()).Filename, at.Value)
default:
v.failf(at, "framework.ConformanceIt() called with non-literal argument")
fmt.Fprintf(os.Stderr, "ERROR: non-literal argument %v at %v\n", arg, v.FileSet.Position(arg.Pos()))
}
}
// Visit visits each node looking for either calls to framework.ConformanceIt,
// which it will emit in its list of conformance tests, or legacy calls to
// It() with a manually embedded [Conformance] tag, which it will complain
// about.
func (v *visitor) Visit(node ast.Node) (w ast.Visitor) {
switch t := node.(type) {
case *ast.CallExpr:
if v.isConformanceCall(t) {
v.emit(t.Args[0])
} else if v.isLegacyItCall(t) {
v.failf(t, "Using It() with manual [Conformance] tag is no longer allowed. Use framework.ConformanceIt() instead.")
return nil
}
}
return v
}
func scandir(dir string) {
v := newVisitor()
pkg, err := parser.ParseDir(v.FileSet, dir, nil, 0)
if err != nil {
panic(err)
}
for _, p := range pkg {
ast.Walk(v, p)
}
}
func scanfile(path string) {
v := newVisitor()
file, err := parser.ParseFile(v.FileSet, path, nil, 0)
if err != nil {
panic(err)
}
ast.Walk(v, file)
}
func main() {
args := os.Args[1:]
if len(args) < 1 {
fmt.Fprintf(os.Stderr, "USAGE: %s <DIR or FILE> [...]\n", os.Args[0])
os.Exit(64)
}
for _, arg := range args {
filepath.Walk(arg, func(path string, info os.FileInfo, err error) error {
if err != nil {
return err
}
if info.IsDir() {
scandir(path)
} else {
// TODO(mml): Remove this once we have all-go-srcs build rules. See https://github.com/kubernetes/repo-infra/pull/45
if strings.HasSuffix(path, ".go") {
scanfile(path)
}
}
return nil
})
}
}
...@@ -33,7 +33,7 @@ var _ = SIGDescribe("CustomResourceDefinition resources", func() { ...@@ -33,7 +33,7 @@ var _ = SIGDescribe("CustomResourceDefinition resources", func() {
f := framework.NewDefaultFramework("custom-resource-definition") f := framework.NewDefaultFramework("custom-resource-definition")
Context("Simple CustomResourceDefinition", func() { 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()) framework.SkipUnlessServerVersionGTE(crdVersion, f.ClientSet.Discovery())
......
...@@ -38,7 +38,7 @@ import ( ...@@ -38,7 +38,7 @@ import (
var _ = SIGDescribe("ReplicationController", func() { var _ = SIGDescribe("ReplicationController", func() {
f := framework.NewDefaultFramework("replication-controller") 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) TestReplicationControllerServeImageOrFail(f, "basic", framework.ServeHostnameImage)
}) })
......
...@@ -78,7 +78,7 @@ func newPodQuota(name, number string) *v1.ResourceQuota { ...@@ -78,7 +78,7 @@ func newPodQuota(name, number string) *v1.ResourceQuota {
var _ = SIGDescribe("ReplicaSet", func() { var _ = SIGDescribe("ReplicaSet", func() {
f := framework.NewDefaultFramework("replicaset") 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) testReplicaSetServeImageOrFail(f, "basic", framework.ServeHostnameImage)
}) })
......
...@@ -158,7 +158,7 @@ var _ = SIGDescribe("ServiceAccounts", func() { ...@@ -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 tokenContent string
var rootCAContent string var rootCAContent string
...@@ -245,7 +245,7 @@ var _ = SIGDescribe("ServiceAccounts", func() { ...@@ -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()) framework.SkipUnlessServerVersionGTE(serviceAccountTokenAutomountVersion, f.ClientSet.Discovery())
var err error var err error
......
...@@ -29,7 +29,7 @@ import ( ...@@ -29,7 +29,7 @@ import (
var _ = Describe("[sig-api-machinery] ConfigMap", func() { var _ = Describe("[sig-api-machinery] ConfigMap", func() {
f := framework.NewDefaultFramework("configmap") 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()) name := "configmap-test-" + string(uuid.NewUUID())
configMap := newConfigMap(f, name) configMap := newConfigMap(f, name)
By(fmt.Sprintf("Creating configMap %v/%v", f.Namespace.Name, configMap.Name)) By(fmt.Sprintf("Creating configMap %v/%v", f.Namespace.Name, configMap.Name))
...@@ -72,7 +72,7 @@ var _ = Describe("[sig-api-machinery] ConfigMap", func() { ...@@ -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()) name := "configmap-test-" + string(uuid.NewUUID())
configMap := newEnvFromConfigMap(f, name) configMap := newEnvFromConfigMap(f, name)
By(fmt.Sprintf("Creating configMap %v/%v", f.Namespace.Name, configMap.Name)) By(fmt.Sprintf("Creating configMap %v/%v", f.Namespace.Name, configMap.Name))
......
...@@ -32,11 +32,11 @@ import ( ...@@ -32,11 +32,11 @@ import (
var _ = Describe("[sig-storage] ConfigMap", func() { var _ = Describe("[sig-storage] ConfigMap", func() {
f := framework.NewDefaultFramework("configmap") 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) 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) defaultMode := int32(0400)
doConfigMapE2EWithoutMappings(f, 0, 0, &defaultMode) doConfigMapE2EWithoutMappings(f, 0, 0, &defaultMode)
}) })
...@@ -46,7 +46,7 @@ var _ = Describe("[sig-storage] ConfigMap", func() { ...@@ -46,7 +46,7 @@ var _ = Describe("[sig-storage] ConfigMap", func() {
doConfigMapE2EWithoutMappings(f, 1000, 1001, &defaultMode) 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) doConfigMapE2EWithoutMappings(f, 1000, 0, nil)
}) })
...@@ -54,16 +54,16 @@ var _ = Describe("[sig-storage] ConfigMap", func() { ...@@ -54,16 +54,16 @@ var _ = Describe("[sig-storage] ConfigMap", func() {
doConfigMapE2EWithoutMappings(f, 1000, 1001, nil) 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) 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) mode := int32(0400)
doConfigMapE2EWithMappings(f, 0, 0, &mode) 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) doConfigMapE2EWithMappings(f, 1000, 0, nil)
}) })
...@@ -71,7 +71,7 @@ var _ = Describe("[sig-storage] ConfigMap", func() { ...@@ -71,7 +71,7 @@ var _ = Describe("[sig-storage] ConfigMap", func() {
doConfigMapE2EWithMappings(f, 1000, 1001, nil) 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) podLogTimeout := framework.GetPodSecretUpdateTimeout(f.ClientSet)
containerTimeoutArg := fmt.Sprintf("--retry_time=%v", int(podLogTimeout.Seconds())) containerTimeoutArg := fmt.Sprintf("--retry_time=%v", int(podLogTimeout.Seconds()))
...@@ -149,7 +149,7 @@ var _ = Describe("[sig-storage] ConfigMap", func() { ...@@ -149,7 +149,7 @@ var _ = Describe("[sig-storage] ConfigMap", func() {
Eventually(pollLogs, podLogTimeout, framework.Poll).Should(ContainSubstring("value-2")) 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) podLogTimeout := framework.GetPodSecretUpdateTimeout(f.ClientSet)
containerTimeoutArg := fmt.Sprintf("--retry_time=%v", int(podLogTimeout.Seconds())) containerTimeoutArg := fmt.Sprintf("--retry_time=%v", int(podLogTimeout.Seconds()))
trueVal := true trueVal := true
...@@ -327,7 +327,7 @@ var _ = Describe("[sig-storage] ConfigMap", func() { ...@@ -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")) 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 ( var (
name = "configmap-test-volume-" + string(uuid.NewUUID()) name = "configmap-test-volume-" + string(uuid.NewUUID())
volumeName = "configmap-volume" volumeName = "configmap-volume"
......
...@@ -54,7 +54,7 @@ var _ = framework.KubeDescribe("Probing container", func() { ...@@ -54,7 +54,7 @@ var _ = framework.KubeDescribe("Probing container", func() {
Description: Make sure that pod with readiness probe should not be Description: Make sure that pod with readiness probe should not be
ready before initial delay and never restart. 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)) p := podClient.Create(makePodSpec(probe.withInitialDelay().build(), nil))
f.WaitForPodReady(p.Name) f.WaitForPodReady(p.Name)
...@@ -86,7 +86,7 @@ var _ = framework.KubeDescribe("Probing container", func() { ...@@ -86,7 +86,7 @@ var _ = framework.KubeDescribe("Probing container", func() {
Description: Make sure that pod with readiness probe that fails should Description: Make sure that pod with readiness probe that fails should
never be ready and never restart. 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)) p := podClient.Create(makePodSpec(probe.withFailing().build(), nil))
Consistently(func() (bool, error) { Consistently(func() (bool, error) {
p, err := podClient.Get(p.Name, metav1.GetOptions{}) p, err := podClient.Get(p.Name, metav1.GetOptions{})
...@@ -111,7 +111,7 @@ var _ = framework.KubeDescribe("Probing container", func() { ...@@ -111,7 +111,7 @@ var _ = framework.KubeDescribe("Probing container", func() {
Description: Make sure the pod is restarted with a cat /tmp/health Description: Make sure the pod is restarted with a cat /tmp/health
liveness probe. 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{ runLivenessTest(f, &v1.Pod{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
Name: "liveness-exec", Name: "liveness-exec",
...@@ -143,7 +143,7 @@ var _ = framework.KubeDescribe("Probing container", func() { ...@@ -143,7 +143,7 @@ var _ = framework.KubeDescribe("Probing container", func() {
Description: Make sure the pod is not restarted with a cat /tmp/health Description: Make sure the pod is not restarted with a cat /tmp/health
liveness probe. 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{ runLivenessTest(f, &v1.Pod{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
Name: "liveness-exec", Name: "liveness-exec",
...@@ -175,7 +175,7 @@ var _ = framework.KubeDescribe("Probing container", func() { ...@@ -175,7 +175,7 @@ var _ = framework.KubeDescribe("Probing container", func() {
Description: Make sure when http liveness probe fails, the pod should Description: Make sure when http liveness probe fails, the pod should
be restarted. 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{ runLivenessTest(f, &v1.Pod{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
Name: "liveness-http", Name: "liveness-http",
...@@ -209,7 +209,7 @@ var _ = framework.KubeDescribe("Probing container", func() { ...@@ -209,7 +209,7 @@ var _ = framework.KubeDescribe("Probing container", func() {
Description: Make sure when a pod gets restarted, its start count Description: Make sure when a pod gets restarted, its start count
should increase. 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{ runLivenessTest(f, &v1.Pod{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
Name: "liveness-http", Name: "liveness-http",
...@@ -242,7 +242,7 @@ var _ = framework.KubeDescribe("Probing container", func() { ...@@ -242,7 +242,7 @@ var _ = framework.KubeDescribe("Probing container", func() {
Description: Make sure when http liveness probe succeeds, the pod Description: Make sure when http liveness probe succeeds, the pod
should not be restarted. 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{ runLivenessTest(f, &v1.Pod{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
Name: "liveness-http", Name: "liveness-http",
...@@ -276,7 +276,7 @@ var _ = framework.KubeDescribe("Probing container", func() { ...@@ -276,7 +276,7 @@ var _ = framework.KubeDescribe("Probing container", func() {
Description: Make sure that the pod is restarted with a docker exec Description: Make sure that the pod is restarted with a docker exec
liveness probe with timeout. 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. // 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") 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{ runLivenessTest(f, &v1.Pod{
......
...@@ -22,20 +22,18 @@ import ( ...@@ -22,20 +22,18 @@ import (
"k8s.io/apimachinery/pkg/util/uuid" "k8s.io/apimachinery/pkg/util/uuid"
"k8s.io/kubernetes/test/e2e/framework" "k8s.io/kubernetes/test/e2e/framework"
imageutils "k8s.io/kubernetes/test/utils/image" imageutils "k8s.io/kubernetes/test/utils/image"
. "github.com/onsi/ginkgo"
) )
var _ = framework.KubeDescribe("Docker Containers", func() { var _ = framework.KubeDescribe("Docker Containers", func() {
f := framework.NewDefaultFramework("containers") 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{ f.TestContainerOutput("use defaults", entrypointTestPod(), 0, []string{
"[/ep default arguments]", "[/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 := entrypointTestPod()
pod.Spec.Containers[0].Args = []string{"override", "arguments"} pod.Spec.Containers[0].Args = []string{"override", "arguments"}
...@@ -46,7 +44,7 @@ var _ = framework.KubeDescribe("Docker Containers", func() { ...@@ -46,7 +44,7 @@ var _ = framework.KubeDescribe("Docker Containers", func() {
// Note: when you override the entrypoint, the image's arguments (docker cmd) // Note: when you override the entrypoint, the image's arguments (docker cmd)
// are ignored. // 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 := entrypointTestPod()
pod.Spec.Containers[0].Command = []string{"/ep-2"} pod.Spec.Containers[0].Command = []string{"/ep-2"}
...@@ -55,7 +53,7 @@ var _ = framework.KubeDescribe("Docker Containers", func() { ...@@ -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 := entrypointTestPod()
pod.Spec.Containers[0].Command = []string{"/ep-2"} pod.Spec.Containers[0].Command = []string{"/ep-2"}
pod.Spec.Containers[0].Args = []string{"override", "arguments"} pod.Spec.Containers[0].Args = []string{"override", "arguments"}
......
...@@ -37,7 +37,7 @@ var ( ...@@ -37,7 +37,7 @@ var (
var _ = Describe("[sig-api-machinery] Downward API", func() { var _ = Describe("[sig-api-machinery] Downward API", func() {
f := framework.NewDefaultFramework("downward-api") 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()) podName := "downward-api-" + string(uuid.NewUUID())
env := []v1.EnvVar{ env := []v1.EnvVar{
{ {
...@@ -68,7 +68,7 @@ var _ = Describe("[sig-api-machinery] Downward API", func() { ...@@ -68,7 +68,7 @@ var _ = Describe("[sig-api-machinery] Downward API", func() {
testDownwardAPI(f, podName, env, expectations) 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()) podName := "downward-api-" + string(uuid.NewUUID())
env := []v1.EnvVar{ env := []v1.EnvVar{
{ {
...@@ -89,7 +89,7 @@ var _ = Describe("[sig-api-machinery] Downward API", func() { ...@@ -89,7 +89,7 @@ var _ = Describe("[sig-api-machinery] Downward API", func() {
testDownwardAPI(f, podName, env, expectations) 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()) framework.SkipUnlessServerVersionGTE(hostIPVersion, f.ClientSet.Discovery())
podName := "downward-api-" + string(uuid.NewUUID()) podName := "downward-api-" + string(uuid.NewUUID())
env := []v1.EnvVar{ env := []v1.EnvVar{
...@@ -111,7 +111,7 @@ var _ = Describe("[sig-api-machinery] Downward API", func() { ...@@ -111,7 +111,7 @@ var _ = Describe("[sig-api-machinery] Downward API", func() {
testDownwardAPI(f, podName, env, expectations) 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()) podName := "downward-api-" + string(uuid.NewUUID())
env := []v1.EnvVar{ env := []v1.EnvVar{
{ {
...@@ -157,7 +157,7 @@ var _ = Describe("[sig-api-machinery] Downward API", func() { ...@@ -157,7 +157,7 @@ var _ = Describe("[sig-api-machinery] Downward API", func() {
testDownwardAPI(f, podName, env, expectations) 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()) podName := "downward-api-" + string(uuid.NewUUID())
env := []v1.EnvVar{ env := []v1.EnvVar{
{ {
...@@ -202,7 +202,7 @@ var _ = Describe("[sig-api-machinery] Downward API", func() { ...@@ -202,7 +202,7 @@ var _ = Describe("[sig-api-machinery] Downward API", func() {
testDownwardAPIUsingPod(f, pod, env, expectations) 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()) framework.SkipUnlessServerVersionGTE(podUIDVersion, f.ClientSet.Discovery())
podName := "downward-api-" + string(uuid.NewUUID()) podName := "downward-api-" + string(uuid.NewUUID())
env := []v1.EnvVar{ env := []v1.EnvVar{
......
...@@ -39,7 +39,7 @@ var _ = Describe("[sig-storage] Downward API volume", func() { ...@@ -39,7 +39,7 @@ var _ = Describe("[sig-storage] Downward API volume", func() {
podClient = f.PodClient() podClient = f.PodClient()
}) })
It("should provide podname only [Conformance]", func() { framework.ConformanceIt("should provide podname only ", func() {
podName := "downwardapi-volume-" + string(uuid.NewUUID()) podName := "downwardapi-volume-" + string(uuid.NewUUID())
pod := downwardAPIVolumePodForSimpleTest(podName, "/etc/podname") pod := downwardAPIVolumePodForSimpleTest(podName, "/etc/podname")
...@@ -48,7 +48,7 @@ var _ = Describe("[sig-storage] Downward API volume", func() { ...@@ -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()) podName := "downwardapi-volume-" + string(uuid.NewUUID())
defaultMode := int32(0400) defaultMode := int32(0400)
pod := downwardAPIVolumePodForModeTest(podName, "/etc/podname", nil, &defaultMode) pod := downwardAPIVolumePodForModeTest(podName, "/etc/podname", nil, &defaultMode)
...@@ -58,7 +58,7 @@ var _ = Describe("[sig-storage] Downward API volume", func() { ...@@ -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()) podName := "downwardapi-volume-" + string(uuid.NewUUID())
mode := int32(0400) mode := int32(0400)
pod := downwardAPIVolumePodForModeTest(podName, "/etc/podname", &mode, nil) pod := downwardAPIVolumePodForModeTest(podName, "/etc/podname", &mode, nil)
...@@ -97,7 +97,7 @@ var _ = Describe("[sig-storage] Downward API volume", func() { ...@@ -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 := map[string]string{}
labels["key1"] = "value1" labels["key1"] = "value1"
labels["key2"] = "value2" labels["key2"] = "value2"
...@@ -124,7 +124,7 @@ var _ = Describe("[sig-storage] Downward API volume", func() { ...@@ -124,7 +124,7 @@ var _ = Describe("[sig-storage] Downward API volume", func() {
podLogTimeout, framework.Poll).Should(ContainSubstring("key3=\"value3\"\n")) 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 := map[string]string{}
annotations["builder"] = "bar" annotations["builder"] = "bar"
podName := "annotationupdate" + string(uuid.NewUUID()) podName := "annotationupdate" + string(uuid.NewUUID())
...@@ -153,7 +153,7 @@ var _ = Describe("[sig-storage] Downward API volume", func() { ...@@ -153,7 +153,7 @@ var _ = Describe("[sig-storage] Downward API volume", func() {
podLogTimeout, framework.Poll).Should(ContainSubstring("builder=\"foo\"\n")) 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()) podName := "downwardapi-volume-" + string(uuid.NewUUID())
pod := downwardAPIVolumeForContainerResources(podName, "/etc/cpu_limit") pod := downwardAPIVolumeForContainerResources(podName, "/etc/cpu_limit")
...@@ -162,7 +162,7 @@ var _ = Describe("[sig-storage] Downward API volume", func() { ...@@ -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()) podName := "downwardapi-volume-" + string(uuid.NewUUID())
pod := downwardAPIVolumeForContainerResources(podName, "/etc/memory_limit") pod := downwardAPIVolumeForContainerResources(podName, "/etc/memory_limit")
...@@ -171,7 +171,7 @@ var _ = Describe("[sig-storage] Downward API volume", func() { ...@@ -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()) podName := "downwardapi-volume-" + string(uuid.NewUUID())
pod := downwardAPIVolumeForContainerResources(podName, "/etc/cpu_request") pod := downwardAPIVolumeForContainerResources(podName, "/etc/cpu_request")
...@@ -180,7 +180,7 @@ var _ = Describe("[sig-storage] Downward API volume", func() { ...@@ -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()) podName := "downwardapi-volume-" + string(uuid.NewUUID())
pod := downwardAPIVolumeForContainerResources(podName, "/etc/memory_request") pod := downwardAPIVolumeForContainerResources(podName, "/etc/memory_request")
...@@ -189,14 +189,14 @@ var _ = Describe("[sig-storage] Downward API volume", func() { ...@@ -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()) podName := "downwardapi-volume-" + string(uuid.NewUUID())
pod := downwardAPIVolumeForDefaultContainerResources(podName, "/etc/cpu_limit") pod := downwardAPIVolumeForDefaultContainerResources(podName, "/etc/cpu_limit")
f.TestContainerOutputRegexp("downward API volume plugin", pod, 0, []string{"[1-9]"}) 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()) podName := "downwardapi-volume-" + string(uuid.NewUUID())
pod := downwardAPIVolumeForDefaultContainerResources(podName, "/etc/memory_limit") pod := downwardAPIVolumeForDefaultContainerResources(podName, "/etc/memory_limit")
......
...@@ -68,59 +68,59 @@ var _ = framework.KubeDescribe("EmptyDir volumes", func() { ...@@ -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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) doTest0777(f, testImageNonRootUid, v1.StorageMediumDefault)
}) })
}) })
......
...@@ -21,8 +21,6 @@ import ( ...@@ -21,8 +21,6 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/uuid" "k8s.io/apimachinery/pkg/util/uuid"
"k8s.io/kubernetes/test/e2e/framework" "k8s.io/kubernetes/test/e2e/framework"
. "github.com/onsi/ginkgo"
) )
// These tests exercise the Kubernetes expansion syntax $(VAR). // These tests exercise the Kubernetes expansion syntax $(VAR).
...@@ -36,7 +34,7 @@ var _ = framework.KubeDescribe("Variable Expansion", func() { ...@@ -36,7 +34,7 @@ var _ = framework.KubeDescribe("Variable Expansion", func() {
Description: Make sure environment variables can be set using an Description: Make sure environment variables can be set using an
expansion of previously defined environment variables 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()) podName := "var-expansion-" + string(uuid.NewUUID())
pod := &v1.Pod{ pod := &v1.Pod{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
...@@ -81,7 +79,7 @@ var _ = framework.KubeDescribe("Variable Expansion", func() { ...@@ -81,7 +79,7 @@ var _ = framework.KubeDescribe("Variable Expansion", func() {
Description: Make sure a container's commands can be set using an Description: Make sure a container's commands can be set using an
expansion of environment variables. 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()) podName := "var-expansion-" + string(uuid.NewUUID())
pod := &v1.Pod{ pod := &v1.Pod{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
...@@ -116,7 +114,7 @@ var _ = framework.KubeDescribe("Variable Expansion", func() { ...@@ -116,7 +114,7 @@ var _ = framework.KubeDescribe("Variable Expansion", func() {
Description: Make sure a container's args can be set using an Description: Make sure a container's args can be set using an
expansion of environment variables. 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()) podName := "var-expansion-" + string(uuid.NewUUID())
pod := &v1.Pod{ pod := &v1.Pod{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
......
...@@ -40,7 +40,7 @@ var _ = framework.KubeDescribe("HostPath", func() { ...@@ -40,7 +40,7 @@ var _ = framework.KubeDescribe("HostPath", func() {
_ = os.Remove("/tmp/test-file") _ = 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{ source := &v1.HostPathVolumeSource{
Path: "/tmp", Path: "/tmp",
} }
......
...@@ -48,7 +48,7 @@ var _ = framework.KubeDescribe("KubeletManagedEtcHosts", func() { ...@@ -48,7 +48,7 @@ var _ = framework.KubeDescribe("KubeletManagedEtcHosts", func() {
f: f, 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") By("Setting up the test")
config.setup() config.setup()
......
...@@ -35,7 +35,7 @@ var _ = Describe("[sig-network] Networking", func() { ...@@ -35,7 +35,7 @@ var _ = Describe("[sig-network] Networking", func() {
Description: Try to hit test endpoints from a test container and make Description: Try to hit test endpoints from a test container and make
sure each of them can report a unique hostname. 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) config := framework.NewCoreNetworkingTestConfig(f)
for _, endpointPod := range config.EndpointPods { for _, endpointPod := range config.EndpointPods {
config.DialFromTestContainer("http", endpointPod.Status.PodIP, framework.EndpointHttpPort, config.MaxTries, 0, sets.NewString(endpointPod.Name)) 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() { ...@@ -47,7 +47,7 @@ var _ = Describe("[sig-network] Networking", func() {
Description: Try to hit test endpoints from a test container using udp Description: Try to hit test endpoints from a test container using udp
and make sure each of them can report a unique hostname. 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) config := framework.NewCoreNetworkingTestConfig(f)
for _, endpointPod := range config.EndpointPods { for _, endpointPod := range config.EndpointPods {
config.DialFromTestContainer("udp", endpointPod.Status.PodIP, framework.EndpointUdpPort, config.MaxTries, 0, sets.NewString(endpointPod.Name)) 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() { ...@@ -59,7 +59,7 @@ var _ = Describe("[sig-network] Networking", func() {
Description: Try to hit test endpoints from the pod and make sure each Description: Try to hit test endpoints from the pod and make sure each
of them can report a unique hostname. 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) config := framework.NewCoreNetworkingTestConfig(f)
for _, endpointPod := range config.EndpointPods { for _, endpointPod := range config.EndpointPods {
config.DialFromNode("http", endpointPod.Status.PodIP, framework.EndpointHttpPort, config.MaxTries, 0, sets.NewString(endpointPod.Name)) 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() { ...@@ -71,7 +71,7 @@ var _ = Describe("[sig-network] Networking", func() {
Description: Try to hit test endpoints from the pod using udp and make sure Description: Try to hit test endpoints from the pod using udp and make sure
each of them can report a unique hostname. 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) config := framework.NewCoreNetworkingTestConfig(f)
for _, endpointPod := range config.EndpointPods { for _, endpointPod := range config.EndpointPods {
config.DialFromNode("udp", endpointPod.Status.PodIP, framework.EndpointUdpPort, config.MaxTries, 0, sets.NewString(endpointPod.Name)) config.DialFromNode("udp", endpointPod.Status.PodIP, framework.EndpointUdpPort, config.MaxTries, 0, sets.NewString(endpointPod.Name))
......
...@@ -133,7 +133,7 @@ var _ = framework.KubeDescribe("Pods", func() { ...@@ -133,7 +133,7 @@ var _ = framework.KubeDescribe("Pods", func() {
Description: Make sure when a pod is created that it is assigned a host IP Description: Make sure when a pod is created that it is assigned a host IP
Address. Address.
*/ */
It("should get a host IP [Conformance]", func() { framework.ConformanceIt("should get a host IP ", func() {
name := "pod-hostip-" + string(uuid.NewUUID()) name := "pod-hostip-" + string(uuid.NewUUID())
testHostIP(podClient, &v1.Pod{ testHostIP(podClient, &v1.Pod{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
...@@ -155,7 +155,7 @@ var _ = framework.KubeDescribe("Pods", func() { ...@@ -155,7 +155,7 @@ var _ = framework.KubeDescribe("Pods", func() {
Description: Makes sure a pod is created, a watch can be setup for the pod, 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. 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") By("creating the pod")
name := "pod-submit-remove-" + string(uuid.NewUUID()) name := "pod-submit-remove-" + string(uuid.NewUUID())
value := strconv.Itoa(time.Now().Nanosecond()) value := strconv.Itoa(time.Now().Nanosecond())
...@@ -280,7 +280,7 @@ var _ = framework.KubeDescribe("Pods", func() { ...@@ -280,7 +280,7 @@ var _ = framework.KubeDescribe("Pods", func() {
Testname: pods-updated-successfully Testname: pods-updated-successfully
Description: Make sure it is possible to successfully update a pod's labels. 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") By("creating the pod")
name := "pod-update-" + string(uuid.NewUUID()) name := "pod-update-" + string(uuid.NewUUID())
value := strconv.Itoa(time.Now().Nanosecond()) value := strconv.Itoa(time.Now().Nanosecond())
...@@ -335,7 +335,7 @@ var _ = framework.KubeDescribe("Pods", func() { ...@@ -335,7 +335,7 @@ var _ = framework.KubeDescribe("Pods", func() {
activeDeadlineSecondsValue, and then waits for the deadline to pass activeDeadlineSecondsValue, and then waits for the deadline to pass
and verifies the pod is terminated. 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") By("creating the pod")
name := "pod-update-activedeadlineseconds-" + string(uuid.NewUUID()) name := "pod-update-activedeadlineseconds-" + string(uuid.NewUUID())
value := strconv.Itoa(time.Now().Nanosecond()) value := strconv.Itoa(time.Now().Nanosecond())
...@@ -381,7 +381,7 @@ var _ = framework.KubeDescribe("Pods", func() { ...@@ -381,7 +381,7 @@ var _ = framework.KubeDescribe("Pods", func() {
Description: Make sure that when a pod is created it contains environment Description: Make sure that when a pod is created it contains environment
variables for each active service. 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. // Make a pod that will be a service.
// This pod serves its hostname via HTTP. // This pod serves its hostname via HTTP.
serverName := "server-envvars-" + string(uuid.NewUUID()) serverName := "server-envvars-" + string(uuid.NewUUID())
......
...@@ -35,7 +35,7 @@ var _ = Describe("[sig-api-machinery] Secrets", func() { ...@@ -35,7 +35,7 @@ var _ = Describe("[sig-api-machinery] Secrets", func() {
Description: Ensure that secret can be consumed via environment Description: Ensure that secret can be consumed via environment
variables. 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()) name := "secret-test-" + string(uuid.NewUUID())
secret := secretForTest(f.Namespace.Name, name) secret := secretForTest(f.Namespace.Name, name)
...@@ -84,7 +84,7 @@ var _ = Describe("[sig-api-machinery] Secrets", func() { ...@@ -84,7 +84,7 @@ var _ = Describe("[sig-api-machinery] Secrets", func() {
Description: Ensure that secret can be consumed via source of a set Description: Ensure that secret can be consumed via source of a set
of ConfigMaps. 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()) name := "secret-test-" + string(uuid.NewUUID())
secret := newEnvFromSecret(f.Namespace.Name, name) secret := newEnvFromSecret(f.Namespace.Name, name)
By(fmt.Sprintf("creating secret %v/%v", f.Namespace.Name, secret.Name)) By(fmt.Sprintf("creating secret %v/%v", f.Namespace.Name, secret.Name))
......
...@@ -38,7 +38,7 @@ var _ = Describe("[sig-storage] Secrets", func() { ...@@ -38,7 +38,7 @@ var _ = Describe("[sig-storage] Secrets", func() {
Description: Ensure that secret can be mounted without mapping to a Description: Ensure that secret can be mounted without mapping to a
pod volume. 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) doSecretE2EWithoutMapping(f, nil /* default mode */, "secret-test-"+string(uuid.NewUUID()), nil, nil)
}) })
...@@ -47,7 +47,7 @@ var _ = Describe("[sig-storage] Secrets", func() { ...@@ -47,7 +47,7 @@ var _ = Describe("[sig-storage] Secrets", func() {
Description: Ensure that secret can be mounted without mapping to a Description: Ensure that secret can be mounted without mapping to a
pod volume in default mode. 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) defaultMode := int32(0400)
doSecretE2EWithoutMapping(f, &defaultMode, "secret-test-"+string(uuid.NewUUID()), nil, nil) doSecretE2EWithoutMapping(f, &defaultMode, "secret-test-"+string(uuid.NewUUID()), nil, nil)
}) })
...@@ -57,7 +57,7 @@ var _ = Describe("[sig-storage] Secrets", func() { ...@@ -57,7 +57,7 @@ var _ = Describe("[sig-storage] Secrets", func() {
Description: Ensure that secret can be mounted without mapping to a pod Description: Ensure that secret can be mounted without mapping to a pod
volume as non-root in default mode with fsGroup set. 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 */ defaultMode := int32(0440) /* setting fsGroup sets mode to at least 440 */
fsGroup := int64(1001) fsGroup := int64(1001)
uid := int64(1000) uid := int64(1000)
...@@ -69,7 +69,7 @@ var _ = Describe("[sig-storage] Secrets", func() { ...@@ -69,7 +69,7 @@ var _ = Describe("[sig-storage] Secrets", func() {
Description: Ensure that secret can be mounted with mapping to a pod Description: Ensure that secret can be mounted with mapping to a pod
volume. 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) doSecretE2EWithMapping(f, nil)
}) })
...@@ -78,7 +78,7 @@ var _ = Describe("[sig-storage] Secrets", func() { ...@@ -78,7 +78,7 @@ var _ = Describe("[sig-storage] Secrets", func() {
Description: Ensure that secret can be mounted with mapping to a pod Description: Ensure that secret can be mounted with mapping to a pod
volume in item mode. 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) mode := int32(0400)
doSecretE2EWithMapping(f, &mode) doSecretE2EWithMapping(f, &mode)
}) })
...@@ -108,7 +108,7 @@ var _ = Describe("[sig-storage] Secrets", func() { ...@@ -108,7 +108,7 @@ var _ = Describe("[sig-storage] Secrets", func() {
Testname: secret-multiple-volume-mounts Testname: secret-multiple-volume-mounts
Description: Ensure that secret can be mounted to multiple pod volumes. 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 // This test ensures that the same secret can be mounted in multiple
// volumes in the same pod. This test case exists to prevent // volumes in the same pod. This test case exists to prevent
// regressions that break this use-case. // regressions that break this use-case.
...@@ -186,7 +186,7 @@ var _ = Describe("[sig-storage] Secrets", func() { ...@@ -186,7 +186,7 @@ var _ = Describe("[sig-storage] Secrets", func() {
Description: Ensure that optional update change to secret can be Description: Ensure that optional update change to secret can be
reflected on a mounted volume. 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) podLogTimeout := framework.GetPodSecretUpdateTimeout(f.ClientSet)
containerTimeoutArg := fmt.Sprintf("--retry_time=%v", int(podLogTimeout.Seconds())) containerTimeoutArg := fmt.Sprintf("--retry_time=%v", int(podLogTimeout.Seconds()))
trueVal := true trueVal := true
......
...@@ -36,7 +36,7 @@ import ( ...@@ -36,7 +36,7 @@ import (
var _ = framework.KubeDescribe("Events", func() { var _ = framework.KubeDescribe("Events", func() {
f := framework.NewDefaultFramework("events") 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) podClient := f.ClientSet.CoreV1().Pods(f.Namespace.Name)
......
...@@ -634,6 +634,11 @@ func KubeDescribe(text string, body func()) bool { ...@@ -634,6 +634,11 @@ func KubeDescribe(text string, body func()) bool {
return Describe("[k8s.io] "+text, body) 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. // PodStateVerification represents a verification of pod state.
// Any time you have a set of pods that you want to operate against or query, // 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. // this struct can be used to declaratively identify those pods.
......
...@@ -305,7 +305,7 @@ var _ = SIGDescribe("Kubectl client", func() { ...@@ -305,7 +305,7 @@ var _ = SIGDescribe("Kubectl client", func() {
nautilus = substituteImageName(string(generated.ReadOrDie(filepath.Join(updateDemoRoot, "nautilus-rc.yaml.in")))) nautilus = substituteImageName(string(generated.ReadOrDie(filepath.Join(updateDemoRoot, "nautilus-rc.yaml.in"))))
kitten = substituteImageName(string(generated.ReadOrDie(filepath.Join(updateDemoRoot, "kitten-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) defer cleanupKubectlInputs(nautilus, ns, updateDemoSelector)
By("creating a replication controller") By("creating a replication controller")
...@@ -313,7 +313,7 @@ var _ = SIGDescribe("Kubectl client", func() { ...@@ -313,7 +313,7 @@ var _ = SIGDescribe("Kubectl client", func() {
framework.ValidateController(c, nautilusImage, 2, "update-demo", updateDemoSelector, getUDData("nautilus.jpg", ns), ns) 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) defer cleanupKubectlInputs(nautilus, ns, updateDemoSelector)
By("creating a replication controller") By("creating a replication controller")
...@@ -327,7 +327,7 @@ var _ = SIGDescribe("Kubectl client", func() { ...@@ -327,7 +327,7 @@ var _ = SIGDescribe("Kubectl client", func() {
framework.ValidateController(c, nautilusImage, 2, "update-demo", updateDemoSelector, getUDData("nautilus.jpg", ns), ns) 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") By("creating the initial replication controller")
framework.RunKubectlOrDieInput(string(nautilus[:]), "create", "-f", "-", fmt.Sprintf("--namespace=%v", ns)) framework.RunKubectlOrDieInput(string(nautilus[:]), "create", "-f", "-", fmt.Sprintf("--namespace=%v", ns))
framework.ValidateController(c, nautilusImage, 2, "update-demo", updateDemoSelector, getUDData("nautilus.jpg", ns), ns) framework.ValidateController(c, nautilusImage, 2, "update-demo", updateDemoSelector, getUDData("nautilus.jpg", ns), ns)
...@@ -354,7 +354,7 @@ var _ = SIGDescribe("Kubectl client", func() { ...@@ -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()) framework.SkipUnlessServerVersionGTE(deploymentsVersion, c.Discovery())
defer forEachGBFile(func(contents string) { defer forEachGBFile(func(contents string) {
...@@ -722,7 +722,7 @@ metadata: ...@@ -722,7 +722,7 @@ metadata:
}) })
framework.KubeDescribe("Kubectl api-versions", func() { 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") By("validating api versions")
output := framework.RunKubectlOrDie("api-versions") output := framework.RunKubectlOrDie("api-versions")
if !strings.Contains(output, "v1") { if !strings.Contains(output, "v1") {
...@@ -813,7 +813,7 @@ metadata: ...@@ -813,7 +813,7 @@ metadata:
}) })
framework.KubeDescribe("Kubectl cluster-info", func() { 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") By("validating cluster-info")
output := framework.RunKubectlOrDie("cluster-info") output := framework.RunKubectlOrDie("cluster-info")
// Can't check exact strings due to terminal control commands (colors) // Can't check exact strings due to terminal control commands (colors)
...@@ -830,7 +830,7 @@ metadata: ...@@ -830,7 +830,7 @@ metadata:
}) })
framework.KubeDescribe("Kubectl describe", func() { 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()) framework.SkipUnlessServerVersionGTE(nodePortsOptionalVersion, c.Discovery())
kv, err := framework.KubectlVersion() kv, err := framework.KubectlVersion()
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
...@@ -935,7 +935,7 @@ metadata: ...@@ -935,7 +935,7 @@ metadata:
}) })
framework.KubeDescribe("Kubectl expose", func() { 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))) controllerJson := substituteImageName(string(readTestFileOrDie(redisControllerFilename)))
nsFlag := fmt.Sprintf("--namespace=%v", ns) nsFlag := fmt.Sprintf("--namespace=%v", ns)
...@@ -1026,7 +1026,7 @@ metadata: ...@@ -1026,7 +1026,7 @@ metadata:
cleanupKubectlInputs(podYaml, ns, pausePodSelector) 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" labelName := "testing-label"
labelValue := "testing-label-value" labelValue := "testing-label-value"
...@@ -1061,7 +1061,7 @@ metadata: ...@@ -1061,7 +1061,7 @@ metadata:
cleanupKubectlInputs(rc, ns, simplePodSelector) 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()) framework.SkipUnlessServerVersionGTE(extendedPodLogFilterVersion, c.Discovery())
// Split("something\n", "\n") returns ["something", ""], so // Split("something\n", "\n") returns ["something", ""], so
...@@ -1114,7 +1114,7 @@ metadata: ...@@ -1114,7 +1114,7 @@ metadata:
}) })
framework.KubeDescribe("Kubectl patch", func() { 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))) controllerJson := substituteImageName(string(readTestFileOrDie(redisControllerFilename)))
nsFlag := fmt.Sprintf("--namespace=%v", ns) nsFlag := fmt.Sprintf("--namespace=%v", ns)
By("creating Redis RC") By("creating Redis RC")
...@@ -1143,7 +1143,7 @@ metadata: ...@@ -1143,7 +1143,7 @@ metadata:
}) })
framework.KubeDescribe("Kubectl version", func() { 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") version := framework.RunKubectlOrDie("version")
requiredItems := []string{"Client Version:", "Server Version:", "Major:", "Minor:", "GitCommit:"} requiredItems := []string{"Client Version:", "Server Version:", "Major:", "Minor:", "GitCommit:"}
for _, item := range requiredItems { for _, item := range requiredItems {
...@@ -1179,7 +1179,7 @@ metadata: ...@@ -1179,7 +1179,7 @@ metadata:
cleanUp() 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) By("running the image " + nginxImage)
framework.RunKubectlOrDie("run", name, "--image="+nginxImage, nsFlag) framework.RunKubectlOrDie("run", name, "--image="+nginxImage, nsFlag)
By("verifying the pod controlled by " + name + " gets created") By("verifying the pod controlled by " + name + " gets created")
...@@ -1209,7 +1209,7 @@ metadata: ...@@ -1209,7 +1209,7 @@ metadata:
framework.RunKubectlOrDie("delete", "rc", rcName, nsFlag) 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) By("running the image " + nginxImage)
framework.RunKubectlOrDie("run", rcName, "--image="+nginxImage, "--generator=run/v1", nsFlag) framework.RunKubectlOrDie("run", rcName, "--image="+nginxImage, "--generator=run/v1", nsFlag)
By("verifying the rc " + rcName + " was created") By("verifying the rc " + rcName + " was created")
...@@ -1265,7 +1265,7 @@ metadata: ...@@ -1265,7 +1265,7 @@ metadata:
framework.RunKubectlOrDie("delete", "rc", rcName, nsFlag) 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) By("running the image " + nginxImage)
framework.RunKubectlOrDie("run", rcName, "--image="+nginxImage, "--generator=run/v1", nsFlag) framework.RunKubectlOrDie("run", rcName, "--image="+nginxImage, "--generator=run/v1", nsFlag)
By("verifying the rc " + rcName + " was created") By("verifying the rc " + rcName + " was created")
...@@ -1309,7 +1309,7 @@ metadata: ...@@ -1309,7 +1309,7 @@ metadata:
Expect(err).NotTo(HaveOccurred()) 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()) framework.SkipUnlessServerVersionGTE(deploymentsVersion, c.Discovery())
By("running the image " + nginxImage) By("running the image " + nginxImage)
...@@ -1351,7 +1351,7 @@ metadata: ...@@ -1351,7 +1351,7 @@ metadata:
framework.RunKubectlOrDie("delete", "jobs", jobName, nsFlag) 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()) framework.SkipUnlessServerVersionGTE(jobsVersion, c.Discovery())
By("running the image " + nginxImage) By("running the image " + nginxImage)
...@@ -1421,7 +1421,7 @@ metadata: ...@@ -1421,7 +1421,7 @@ metadata:
framework.RunKubectlOrDie("delete", "pods", podName, nsFlag) 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()) framework.SkipUnlessServerVersionGTE(jobsVersion, c.Discovery())
By("running the image " + nginxImage) By("running the image " + nginxImage)
...@@ -1454,7 +1454,7 @@ metadata: ...@@ -1454,7 +1454,7 @@ metadata:
framework.RunKubectlOrDie("delete", "pods", podName, nsFlag) 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()) framework.SkipUnlessServerVersionGTE(jobsVersion, c.Discovery())
By("running the image " + nginxImage) By("running the image " + nginxImage)
...@@ -1492,7 +1492,7 @@ metadata: ...@@ -1492,7 +1492,7 @@ metadata:
framework.KubeDescribe("Kubectl run --rm job", func() { framework.KubeDescribe("Kubectl run --rm job", func() {
jobName := "e2e-test-rm-busybox-job" 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) nsFlag := fmt.Sprintf("--namespace=%v", ns)
// The rkt runtime doesn't support attach, see #23335 // The rkt runtime doesn't support attach, see #23335
...@@ -1518,7 +1518,7 @@ metadata: ...@@ -1518,7 +1518,7 @@ metadata:
framework.KubeDescribe("Proxy server", func() { framework.KubeDescribe("Proxy server", func() {
// TODO: test proxy options (static, prefix, etc) // 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") By("starting the proxy server")
port, cmd, err := startProxyServer() port, cmd, err := startProxyServer()
if cmd != nil { if cmd != nil {
...@@ -1538,7 +1538,7 @@ metadata: ...@@ -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") By("Starting the proxy")
tmpdir, err := ioutil.TempDir("", "kubectl-proxy-unix") tmpdir, err := ioutil.TempDir("", "kubectl-proxy-unix")
if err != nil { if err != nil {
......
...@@ -284,7 +284,7 @@ func reverseArray(arr []string) []string { ...@@ -284,7 +284,7 @@ func reverseArray(arr []string) []string {
var _ = SIGDescribe("DNS", func() { var _ = SIGDescribe("DNS", func() {
f := framework.NewDefaultFramework("dns") 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. // 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. // TODO: Spin up a separate test service and test that dns works for that service.
namesToResolve := []string{ namesToResolve := []string{
...@@ -310,7 +310,7 @@ var _ = SIGDescribe("DNS", func() { ...@@ -310,7 +310,7 @@ var _ = SIGDescribe("DNS", func() {
validateDNSResults(f, pod, append(wheezyFileNames, jessieFileNames...)) 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. // Create a test headless service.
By("Creating a test headless service") By("Creating a test headless service")
testServiceSelector := map[string]string{ testServiceSelector := map[string]string{
......
...@@ -67,14 +67,14 @@ var _ = SIGDescribe("Proxy", func() { ...@@ -67,14 +67,14 @@ var _ = SIGDescribe("Proxy", func() {
Description: Ensure that proxy on node logs works with generic top Description: Ensure that proxy on node logs works with generic top
level prefix proxy and explicit kubelet port. 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 Testname: proxy-prefix-node-logs
Description: Ensure that proxy on node logs works with generic top Description: Ensure that proxy on node logs works with generic top
level prefix proxy. 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/") }) It("should proxy to cadvisor", func() { nodeProxyTest(f, prefix+"/proxy/nodes/", ":4194/containers/") })
/* /*
...@@ -82,14 +82,14 @@ var _ = SIGDescribe("Proxy", func() { ...@@ -82,14 +82,14 @@ var _ = SIGDescribe("Proxy", func() {
Description: Ensure that proxy on node logs works with node proxy Description: Ensure that proxy on node logs works with node proxy
subresource and explicit kubelet port. 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 Testname: proxy-subresource-node-logs
Description: Ensure that proxy on node logs works with node proxy Description: Ensure that proxy on node logs works with node proxy
subresource. 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/") }) 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 // using the porter image to serve content, access the content
...@@ -100,7 +100,7 @@ var _ = SIGDescribe("Proxy", func() { ...@@ -100,7 +100,7 @@ var _ = SIGDescribe("Proxy", func() {
Description: Ensure that proxy through a service and a pod works with Description: Ensure that proxy through a service and a pod works with
both generic top level prefix proxy and proxy subresource. 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() start := time.Now()
labels := map[string]string{"proxy-service-target": "true"} labels := map[string]string{"proxy-service-target": "true"}
service, err := f.ClientSet.CoreV1().Services(f.Namespace.Name).Create(&v1.Service{ service, err := f.ClientSet.CoreV1().Services(f.Namespace.Name).Create(&v1.Service{
......
...@@ -69,7 +69,7 @@ var _ = SIGDescribe("Services", func() { ...@@ -69,7 +69,7 @@ var _ = SIGDescribe("Services", func() {
Testname: service-kubernetes-exists Testname: service-kubernetes-exists
Description: Make sure kubernetes service does exist. 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{}) _, err := cs.CoreV1().Services(metav1.NamespaceDefault).Get("kubernetes", metav1.GetOptions{})
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
}) })
...@@ -79,7 +79,7 @@ var _ = SIGDescribe("Services", func() { ...@@ -79,7 +79,7 @@ var _ = SIGDescribe("Services", func() {
Description: Ensure a service with no pod, one pod or two pods has Description: Ensure a service with no pod, one pod or two pods has
valid/accessible endpoints (same port number for service and pods). 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 // TODO: use the ServiceTestJig here
serviceName := "endpoint-test2" serviceName := "endpoint-test2"
ns := f.Namespace.Name ns := f.Namespace.Name
...@@ -144,7 +144,7 @@ var _ = SIGDescribe("Services", func() { ...@@ -144,7 +144,7 @@ var _ = SIGDescribe("Services", func() {
Description: Ensure a service with no pod, one pod or two pods has Description: Ensure a service with no pod, one pod or two pods has
valid/accessible endpoints (different port number for pods). 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 // TODO: use the ServiceTestJig here
// repacking functionality is intentionally not tested here - it's better to test it in an integration test. // repacking functionality is intentionally not tested here - it's better to test it in an integration test.
serviceName := "multi-endpoint-test" serviceName := "multi-endpoint-test"
......
...@@ -51,7 +51,7 @@ var _ = SIGDescribe("Service endpoints latency", func() { ...@@ -51,7 +51,7 @@ var _ = SIGDescribe("Service endpoints latency", func() {
(e.g. p50 < 20 seconds and p99 < 50 seconds). If any call to the (e.g. p50 < 20 seconds and p99 < 50 seconds). If any call to the
service endpoint fails, the test will also fail. 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 ( const (
// These are very generous criteria. Ideally we will // These are very generous criteria. Ideally we will
// get this much lower in the future. See issue // get this much lower in the future. See issue
......
...@@ -47,7 +47,7 @@ var _ = framework.KubeDescribe("Pods Extended", func() { ...@@ -47,7 +47,7 @@ var _ = framework.KubeDescribe("Pods Extended", func() {
podClient = f.PodClient() podClient = f.PodClient()
}) })
// Flaky issue #36821. // 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") By("creating the pod")
name := "pod-submit-remove-" + string(uuid.NewUUID()) name := "pod-submit-remove-" + string(uuid.NewUUID())
value := strconv.Itoa(time.Now().Nanosecond()) value := strconv.Itoa(time.Now().Nanosecond())
...@@ -199,7 +199,7 @@ var _ = framework.KubeDescribe("Pods Extended", func() { ...@@ -199,7 +199,7 @@ var _ = framework.KubeDescribe("Pods Extended", func() {
BeforeEach(func() { BeforeEach(func() {
podClient = f.PodClient() podClient = f.PodClient()
}) })
It("should be submitted and removed [Conformance]", func() { framework.ConformanceIt("should be submitted and removed ", func() {
By("creating the pod") By("creating the pod")
name := "pod-qos-class-" + string(uuid.NewUUID()) name := "pod-qos-class-" + string(uuid.NewUUID())
pod := &v1.Pod{ pod := &v1.Pod{
......
...@@ -180,7 +180,7 @@ var _ = framework.KubeDescribe("PreStop", func() { ...@@ -180,7 +180,7 @@ var _ = framework.KubeDescribe("PreStop", func() {
Description: Makes sure a pod's preStop handler is successfully Description: Makes sure a pod's preStop handler is successfully
invoked immediately before a container is terminated. 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) testPreStop(f.ClientSet, f.Namespace.Name)
}) })
}) })
...@@ -242,7 +242,7 @@ var _ = SIGDescribe("SchedulerPredicates [Serial]", func() { ...@@ -242,7 +242,7 @@ var _ = SIGDescribe("SchedulerPredicates [Serial]", func() {
Description: Ensure that scheduler accounts node resources correctly Description: Ensure that scheduler accounts node resources correctly
and respects pods' resource requirements during scheduling. 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) framework.WaitForStableCluster(cs, masterNodes)
nodeMaxAllocatable := int64(0) nodeMaxAllocatable := int64(0)
nodeToAllocatableMap := make(map[string]int64) nodeToAllocatableMap := make(map[string]int64)
...@@ -348,7 +348,7 @@ var _ = SIGDescribe("SchedulerPredicates [Serial]", func() { ...@@ -348,7 +348,7 @@ var _ = SIGDescribe("SchedulerPredicates [Serial]", func() {
Description: Ensure that scheduler respects the NodeSelector field of Description: Ensure that scheduler respects the NodeSelector field of
PodSpec during scheduling (when it does not match any node). 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.") By("Trying to schedule Pod with nonempty NodeSelector.")
podName := "restricted-pod" podName := "restricted-pod"
...@@ -394,7 +394,7 @@ var _ = SIGDescribe("SchedulerPredicates [Serial]", func() { ...@@ -394,7 +394,7 @@ var _ = SIGDescribe("SchedulerPredicates [Serial]", func() {
Description: Ensure that scheduler respects the NodeSelector field Description: Ensure that scheduler respects the NodeSelector field
of PodSpec during scheduling (when it matches). 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) nodeName := GetNodeThatCanRunPod(f)
By("Trying to apply a random label on the found node.") By("Trying to apply a random label on the found node.")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment