Skip to content

Commit 700fbd0

Browse files
author
k8s-merge-robot
authored
Merge pull request kubernetes#27461 from euank/e2e-rkt-runtime
Automatic merge from submit-queue e2e: Allow skipping tests for specific runtimes, skip a few tests under rkt The main benefit of this is that it gives a developer more useful output (more signal to noise) for things that are known broken on that runtime. cc @kubernetes/rktnetes-maintainers , @ixdy I'll run this PR through our jenkins and make sure things look happy and compare to the e2e results for this PR.
2 parents ff7c280 + e50a821 commit 700fbd0

File tree

5 files changed

+18
-0
lines changed

5 files changed

+18
-0
lines changed

hack/ginkgo-e2e.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ export PATH=$(dirname "${e2e_test}"):"${PATH}"
120120
--node-instance-group="${NODE_INSTANCE_GROUP:-}" \
121121
--prefix="${KUBE_GCE_INSTANCE_PREFIX:-e2e}" \
122122
${OS_DISTRIBUTION:+"--os-distro=${OS_DISTRIBUTION}"} \
123+
${KUBE_CONTAINER_RUNTIME:+"--container-runtime=${KUBE_CONTAINER_RUNTIME}"} \
123124
${NUM_NODES:+"--num-nodes=${NUM_NODES}"} \
124125
${E2E_CLEAN_START:+"--clean-start=true"} \
125126
${E2E_MIN_STARTUP_PODS:+"--minStartupPods=${E2E_MIN_STARTUP_PODS}"} \

test/e2e/framework/test_context.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ type TestContextType struct {
4747
UpgradeTarget string
4848
PrometheusPushGateway string
4949
OSDistro string
50+
ContainerRuntime string
5051
VerifyServiceAccount bool
5152
DeleteNamespace bool
5253
CleanStart bool
@@ -108,6 +109,7 @@ func RegisterFlags() {
108109
flag.StringVar(&TestContext.ReportPrefix, "report-prefix", "", "Optional prefix for JUnit XML reports. Default is empty, which doesn't prepend anything to the default name.")
109110
flag.StringVar(&TestContext.Prefix, "prefix", "e2e", "A prefix to be added to cloud resources created during testing.")
110111
flag.StringVar(&TestContext.OSDistro, "os-distro", "debian", "The OS distribution of cluster VM instances (debian, trusty, or coreos).")
112+
flag.StringVar(&TestContext.ContainerRuntime, "container-runtime", "docker", "The container runtime of cluster VM instances (docker or rkt).")
111113

112114
// TODO: Flags per provider? Rename gce-project/gce-zone?
113115
cloudConfig := &TestContext.CloudConfig

test/e2e/framework/util.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,14 @@ func SkipUnlessProviderIs(supportedProviders ...string) {
367367
}
368368
}
369369

370+
func SkipIfContainerRuntimeIs(runtimes ...string) {
371+
for _, runtime := range runtimes {
372+
if runtime == TestContext.ContainerRuntime {
373+
Skipf("Not supported under container runtime %s", runtime)
374+
}
375+
}
376+
}
377+
370378
func ProviderIs(providers ...string) bool {
371379
for _, provider := range providers {
372380
if strings.ToLower(provider) == strings.ToLower(TestContext.Provider) {

test/e2e/kubectl.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ var _ = framework.KubeDescribe("Kubectl client", func() {
348348
})
349349

350350
It("should support inline execution and attach", func() {
351+
framework.SkipIfContainerRuntimeIs("rkt") // #23335
351352
framework.SkipUnlessServerVersionGTE(jobsVersion, c)
352353

353354
nsFlag := fmt.Sprintf("--namespace=%v", ns)
@@ -1044,6 +1045,8 @@ var _ = framework.KubeDescribe("Kubectl client", func() {
10441045
jobName := "e2e-test-rm-busybox-job"
10451046

10461047
It("should create a job from an image, then delete the job [Conformance]", func() {
1048+
// The rkt runtime doesn't support attach, see #23335
1049+
framework.SkipIfContainerRuntimeIs("rkt")
10471050
framework.SkipUnlessServerVersionGTE(jobsVersion, c)
10481051

10491052
By("executing a command with run --rm and attach with stdin")

test/e2e/pods.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,7 @@ var _ = framework.KubeDescribe("Pods", func() {
664664
})
665665

666666
It("should invoke init containers on a RestartNever pod", func() {
667+
framework.SkipIfContainerRuntimeIs("rkt") // #25988
667668
podClient := f.Client.Pods(f.Namespace.Name)
668669

669670
By("creating the pod")
@@ -729,6 +730,7 @@ var _ = framework.KubeDescribe("Pods", func() {
729730
})
730731

731732
It("should invoke init containers on a RestartAlways pod", func() {
733+
framework.SkipIfContainerRuntimeIs("rkt") // #25988
732734
podClient := f.Client.Pods(f.Namespace.Name)
733735

734736
By("creating the pod")
@@ -798,6 +800,7 @@ var _ = framework.KubeDescribe("Pods", func() {
798800
})
799801

800802
It("should not start app containers if init containers fail on a RestartAlways pod", func() {
803+
framework.SkipIfContainerRuntimeIs("rkt") // #25988
801804
podClient := f.Client.Pods(f.Namespace.Name)
802805

803806
By("creating the pod")
@@ -913,6 +916,7 @@ var _ = framework.KubeDescribe("Pods", func() {
913916
})
914917

915918
It("should not start app containers and fail the pod if init containers fail on a RestartNever pod", func() {
919+
framework.SkipIfContainerRuntimeIs("rkt") // #25988
916920
podClient := f.Client.Pods(f.Namespace.Name)
917921

918922
By("creating the pod")

0 commit comments

Comments
 (0)