From a188ea8d0ceb8f133ec2d6885dff1256ee638d6a Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Tue, 16 Mar 2021 16:28:36 -0400 Subject: [PATCH 1/2] test: Correctly detect non-mirrored images Excluding e2e-* namespaces was subtly broken and as a result the test was not running. --- cmd/openshift-tests/images.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/openshift-tests/images.go b/cmd/openshift-tests/images.go index 2f5f7acae071..bc545d0c17c8 100644 --- a/cmd/openshift-tests/images.go +++ b/cmd/openshift-tests/images.go @@ -217,11 +217,11 @@ func pulledInvalidImages(fromRepository string) ginkgo.JUnitForEventsFunc { pulls := make(map[string]sets.String) for _, event := range events { // only messages that include a Pulled reason - if !strings.Contains(event.Message, " reason/Pulled ") { + if !strings.Contains(" "+event.Message, " reason/Pulled ") { continue } // only look at pull events from an e2e-* namespace - if !strings.Contains(event.Locator, " ns/e2e-") { + if !strings.Contains(" "+event.Locator, " ns/e2e-") { continue } From f02938df2716f8580e1ae2ba72f1d2eb0c74c527 Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Tue, 16 Mar 2021 18:24:13 -0400 Subject: [PATCH 2/2] test: Fix regressions in missing images The test was disabled, which caused code to regress. Add the code back --- test/extended/testdata/bindata.go | 28 +++++++++---------- .../testdata/hello-openshift/hello-pod.json | 2 +- .../test/cmd/testdata/mixed-api-versions.yaml | 2 +- .../templateinstance_objectkinds.yaml | 2 +- test/extended/testdata/router/ingress.yaml | 4 +-- .../testdata/router/router-common.yaml | 2 +- .../router/router-config-manager.yaml | 2 +- .../testdata/router/router-metrics.yaml | 4 +-- .../testdata/router/weighted-router.yaml | 6 ++-- .../templates/templateinstance_badobject.yaml | 2 +- .../templateinstance_objectkinds.yaml | 2 +- 11 files changed, 28 insertions(+), 28 deletions(-) diff --git a/test/extended/testdata/bindata.go b/test/extended/testdata/bindata.go index 2d85a10c93f4..b632551d8a25 100644 --- a/test/extended/testdata/bindata.go +++ b/test/extended/testdata/bindata.go @@ -34484,7 +34484,7 @@ var _testExtendedTestdataCmdTestCmdTestdataHelloOpenshiftHelloPodJson = []byte(` "containers": [ { "name": "hello-openshift", - "image": "k8s.gcr.io/e2e-test-images/agnhost:2.20", + "image": "k8s.gcr.io/e2e-test-images/agnhost:2.21", "args": ["netexec"], "ports": [ { @@ -36059,7 +36059,7 @@ items: run: v1-job spec: containers: - - image: k8s.gcr.io/e2e-test-images/agnhost:2.20 + - image: k8s.gcr.io/e2e-test-images/agnhost:2.21 name: hello-container restartPolicy: Never @@ -38701,7 +38701,7 @@ items: spec: containers: - name: hello-openshift - image: k8s.gcr.io/e2e-test-images/agnhost:2.20 + image: k8s.gcr.io/e2e-test-images/agnhost:2.21 - kind: Route apiVersion: v1 metadata: @@ -49054,7 +49054,7 @@ items: terminationGracePeriodSeconds: 1 containers: - name: test - image: k8s.gcr.io/e2e-test-images/agnhost:2.20 + image: k8s.gcr.io/e2e-test-images/agnhost:2.21 args: ["netexec"] ports: - containerPort: 8080 @@ -49072,7 +49072,7 @@ items: terminationGracePeriodSeconds: 1 containers: - name: test - image: k8s.gcr.io/e2e-test-images/agnhost:2.20 + image: k8s.gcr.io/e2e-test-images/agnhost:2.21 args: ["netexec"] ports: - containerPort: 8080 @@ -49305,7 +49305,7 @@ objects: terminationGracePeriodSeconds: 1 containers: - name: test - image: k8s.gcr.io/e2e-test-images/agnhost:2.20 + image: k8s.gcr.io/e2e-test-images/agnhost:2.21 args: ["netexec"] ports: - containerPort: 8080 @@ -49467,7 +49467,7 @@ objects: terminationGracePeriodSeconds: 1 containers: - name: test - image: k8s.gcr.io/e2e-test-images/agnhost:2.20 + image: k8s.gcr.io/e2e-test-images/agnhost:2.21 args: ["netexec"] ports: - containerPort: 8080 @@ -50762,7 +50762,7 @@ items: terminationGracePeriodSeconds: 1 containers: - name: test - image: k8s.gcr.io/e2e-test-images/agnhost:2.20 + image: k8s.gcr.io/e2e-test-images/agnhost:2.21 args: ["netexec"] ports: - containerPort: 8080 @@ -50780,7 +50780,7 @@ items: terminationGracePeriodSeconds: 1 containers: - name: test - image: k8s.gcr.io/e2e-test-images/agnhost:2.20 + image: k8s.gcr.io/e2e-test-images/agnhost:2.21 args: ["netexec"] ports: - containerPort: 8080 @@ -51120,7 +51120,7 @@ objects: terminationGracePeriodSeconds: 1 containers: - name: test - image: k8s.gcr.io/e2e-test-images/agnhost:2.20 + image: k8s.gcr.io/e2e-test-images/agnhost:2.21 args: ["netexec"] ports: - containerPort: 8080 @@ -51138,7 +51138,7 @@ objects: terminationGracePeriodSeconds: 1 containers: - name: test - image: k8s.gcr.io/e2e-test-images/agnhost:2.20 + image: k8s.gcr.io/e2e-test-images/agnhost:2.21 args: ["netexec"] ports: - containerPort: 8080 @@ -51156,7 +51156,7 @@ objects: terminationGracePeriodSeconds: 1 containers: - name: test - image: k8s.gcr.io/e2e-test-images/agnhost:2.20 + image: k8s.gcr.io/e2e-test-images/agnhost:2.21 args: ["netexec"] ports: - containerPort: 8080 @@ -52554,7 +52554,7 @@ items: spec: containers: - name: hello-openshift - image: k8s.gcr.io/e2e-test-images/agnhost:2.20 + image: k8s.gcr.io/e2e-test-images/agnhost:2.21 `) func testExtendedTestdataTemplatesTemplateinstance_badobjectYamlBytes() ([]byte, error) { @@ -52614,7 +52614,7 @@ items: spec: containers: - name: hello-openshift - image: k8s.gcr.io/e2e-test-images/agnhost:2.20 + image: k8s.gcr.io/e2e-test-images/agnhost:2.21 - kind: Route apiVersion: v1 metadata: diff --git a/test/extended/testdata/cmd/test/cmd/testdata/hello-openshift/hello-pod.json b/test/extended/testdata/cmd/test/cmd/testdata/hello-openshift/hello-pod.json index 98c9027fefec..9d3471000e12 100644 --- a/test/extended/testdata/cmd/test/cmd/testdata/hello-openshift/hello-pod.json +++ b/test/extended/testdata/cmd/test/cmd/testdata/hello-openshift/hello-pod.json @@ -12,7 +12,7 @@ "containers": [ { "name": "hello-openshift", - "image": "k8s.gcr.io/e2e-test-images/agnhost:2.20", + "image": "k8s.gcr.io/e2e-test-images/agnhost:2.21", "args": ["netexec"], "ports": [ { diff --git a/test/extended/testdata/cmd/test/cmd/testdata/mixed-api-versions.yaml b/test/extended/testdata/cmd/test/cmd/testdata/mixed-api-versions.yaml index 3981ad5877ad..996ed1a3cd23 100644 --- a/test/extended/testdata/cmd/test/cmd/testdata/mixed-api-versions.yaml +++ b/test/extended/testdata/cmd/test/cmd/testdata/mixed-api-versions.yaml @@ -34,7 +34,7 @@ items: run: v1-job spec: containers: - - image: k8s.gcr.io/e2e-test-images/agnhost:2.20 + - image: k8s.gcr.io/e2e-test-images/agnhost:2.21 name: hello-container restartPolicy: Never diff --git a/test/extended/testdata/cmd/test/cmd/testdata/templateinstance_objectkinds.yaml b/test/extended/testdata/cmd/test/cmd/testdata/templateinstance_objectkinds.yaml index 9db1c8294e14..0af6ac33d843 100644 --- a/test/extended/testdata/cmd/test/cmd/testdata/templateinstance_objectkinds.yaml +++ b/test/extended/testdata/cmd/test/cmd/testdata/templateinstance_objectkinds.yaml @@ -40,7 +40,7 @@ items: spec: containers: - name: hello-openshift - image: k8s.gcr.io/e2e-test-images/agnhost:2.20 + image: k8s.gcr.io/e2e-test-images/agnhost:2.21 - kind: Route apiVersion: v1 metadata: diff --git a/test/extended/testdata/router/ingress.yaml b/test/extended/testdata/router/ingress.yaml index 94205b964e86..6e60e917a554 100644 --- a/test/extended/testdata/router/ingress.yaml +++ b/test/extended/testdata/router/ingress.yaml @@ -79,7 +79,7 @@ items: terminationGracePeriodSeconds: 1 containers: - name: test - image: k8s.gcr.io/e2e-test-images/agnhost:2.20 + image: k8s.gcr.io/e2e-test-images/agnhost:2.21 args: ["netexec"] ports: - containerPort: 8080 @@ -97,7 +97,7 @@ items: terminationGracePeriodSeconds: 1 containers: - name: test - image: k8s.gcr.io/e2e-test-images/agnhost:2.20 + image: k8s.gcr.io/e2e-test-images/agnhost:2.21 args: ["netexec"] ports: - containerPort: 8080 diff --git a/test/extended/testdata/router/router-common.yaml b/test/extended/testdata/router/router-common.yaml index 0c6c3550aef1..be6c97a9018c 100644 --- a/test/extended/testdata/router/router-common.yaml +++ b/test/extended/testdata/router/router-common.yaml @@ -99,7 +99,7 @@ objects: terminationGracePeriodSeconds: 1 containers: - name: test - image: k8s.gcr.io/e2e-test-images/agnhost:2.20 + image: k8s.gcr.io/e2e-test-images/agnhost:2.21 args: ["netexec"] ports: - containerPort: 8080 diff --git a/test/extended/testdata/router/router-config-manager.yaml b/test/extended/testdata/router/router-config-manager.yaml index 2d88d4886a69..a0c26666c079 100644 --- a/test/extended/testdata/router/router-config-manager.yaml +++ b/test/extended/testdata/router/router-config-manager.yaml @@ -136,7 +136,7 @@ objects: terminationGracePeriodSeconds: 1 containers: - name: test - image: k8s.gcr.io/e2e-test-images/agnhost:2.20 + image: k8s.gcr.io/e2e-test-images/agnhost:2.21 args: ["netexec"] ports: - containerPort: 8080 diff --git a/test/extended/testdata/router/router-metrics.yaml b/test/extended/testdata/router/router-metrics.yaml index e82e8220622e..5afee713b8d6 100644 --- a/test/extended/testdata/router/router-metrics.yaml +++ b/test/extended/testdata/router/router-metrics.yaml @@ -80,7 +80,7 @@ items: terminationGracePeriodSeconds: 1 containers: - name: test - image: k8s.gcr.io/e2e-test-images/agnhost:2.20 + image: k8s.gcr.io/e2e-test-images/agnhost:2.21 args: ["netexec"] ports: - containerPort: 8080 @@ -98,7 +98,7 @@ items: terminationGracePeriodSeconds: 1 containers: - name: test - image: k8s.gcr.io/e2e-test-images/agnhost:2.20 + image: k8s.gcr.io/e2e-test-images/agnhost:2.21 args: ["netexec"] ports: - containerPort: 8080 diff --git a/test/extended/testdata/router/weighted-router.yaml b/test/extended/testdata/router/weighted-router.yaml index d29aea59e9bd..524333b60101 100644 --- a/test/extended/testdata/router/weighted-router.yaml +++ b/test/extended/testdata/router/weighted-router.yaml @@ -122,7 +122,7 @@ objects: terminationGracePeriodSeconds: 1 containers: - name: test - image: k8s.gcr.io/e2e-test-images/agnhost:2.20 + image: k8s.gcr.io/e2e-test-images/agnhost:2.21 args: ["netexec"] ports: - containerPort: 8080 @@ -140,7 +140,7 @@ objects: terminationGracePeriodSeconds: 1 containers: - name: test - image: k8s.gcr.io/e2e-test-images/agnhost:2.20 + image: k8s.gcr.io/e2e-test-images/agnhost:2.21 args: ["netexec"] ports: - containerPort: 8080 @@ -158,7 +158,7 @@ objects: terminationGracePeriodSeconds: 1 containers: - name: test - image: k8s.gcr.io/e2e-test-images/agnhost:2.20 + image: k8s.gcr.io/e2e-test-images/agnhost:2.21 args: ["netexec"] ports: - containerPort: 8080 diff --git a/test/extended/testdata/templates/templateinstance_badobject.yaml b/test/extended/testdata/templates/templateinstance_badobject.yaml index f7fb93cdccdc..e1db120e3628 100644 --- a/test/extended/testdata/templates/templateinstance_badobject.yaml +++ b/test/extended/testdata/templates/templateinstance_badobject.yaml @@ -28,4 +28,4 @@ items: spec: containers: - name: hello-openshift - image: k8s.gcr.io/e2e-test-images/agnhost:2.20 + image: k8s.gcr.io/e2e-test-images/agnhost:2.21 diff --git a/test/extended/testdata/templates/templateinstance_objectkinds.yaml b/test/extended/testdata/templates/templateinstance_objectkinds.yaml index 9db1c8294e14..0af6ac33d843 100644 --- a/test/extended/testdata/templates/templateinstance_objectkinds.yaml +++ b/test/extended/testdata/templates/templateinstance_objectkinds.yaml @@ -40,7 +40,7 @@ items: spec: containers: - name: hello-openshift - image: k8s.gcr.io/e2e-test-images/agnhost:2.20 + image: k8s.gcr.io/e2e-test-images/agnhost:2.21 - kind: Route apiVersion: v1 metadata: