Skip to content

Commit baba7b5

Browse files
Merge pull request #345 from openshift-cherrypick-robot/cherry-pick-343-to-release-4.20
[release-4.20] OCPBUGS-74132: test/e2e - do not use ambiguous container image short names
2 parents 6649cb8 + 554e05d commit baba7b5

2 files changed

Lines changed: 12 additions & 11 deletions

File tree

test/e2e/proxy_test.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func TestOAuthProxyE2E(t *testing.T) {
9292
proxyArgs: []string{
9393
"--upstream=http://localhost:8080",
9494
},
95-
pageResult: "URI: /",
95+
pageResult: "NOW:",
9696
},
9797
{
9898
name: "scope-full",
@@ -108,7 +108,7 @@ func TestOAuthProxyE2E(t *testing.T) {
108108
"--upstream=http://localhost:8080",
109109
`--openshift-sar={"namespace":"` + ns + `","resource":"services","verb":"list"}`,
110110
},
111-
pageResult: "URI: /",
111+
pageResult: "NOW:",
112112
},
113113
{
114114
name: "sar-fail",
@@ -124,7 +124,7 @@ func TestOAuthProxyE2E(t *testing.T) {
124124
"--upstream=http://localhost:8080",
125125
`--openshift-sar={"namespace":"` + ns + `","resource":"routes","resourceName":"proxy-route","verb":"get"}`,
126126
},
127-
pageResult: "URI: /",
127+
pageResult: "NOW:",
128128
},
129129
{
130130
name: "sar-name-fail",
@@ -140,7 +140,7 @@ func TestOAuthProxyE2E(t *testing.T) {
140140
"--upstream=http://localhost:8080",
141141
`--openshift-sar=[{"namespace":"` + ns + `","resource":"services","verb":"list"}, {"namespace":"` + ns + `","resource":"routes","verb":"list"}]`,
142142
},
143-
pageResult: "URI: /",
143+
pageResult: "NOW:",
144144
},
145145
{
146146
name: "sar-multi-fail",
@@ -157,7 +157,7 @@ func TestOAuthProxyE2E(t *testing.T) {
157157
`--skip-auth-regex=^/foo`,
158158
},
159159
accessSubPath: "/foo",
160-
pageResult: "URI: /foo\n",
160+
pageResult: "NOW:",
161161
bypass: true,
162162
},
163163
{
@@ -167,7 +167,7 @@ func TestOAuthProxyE2E(t *testing.T) {
167167
`--skip-auth-regex=^/foo`,
168168
},
169169
accessSubPath: "/bar",
170-
pageResult: "URI: /bar",
170+
pageResult: "NOW:",
171171
},
172172
{
173173
name: "bypass-auth-foo",
@@ -176,7 +176,7 @@ func TestOAuthProxyE2E(t *testing.T) {
176176
`--bypass-auth-for=^/foo`,
177177
},
178178
accessSubPath: "/foo",
179-
pageResult: "URI: /foo\n",
179+
pageResult: "NOW:",
180180
bypass: true,
181181
},
182182
{
@@ -186,7 +186,7 @@ func TestOAuthProxyE2E(t *testing.T) {
186186
`--bypass-auth-except-for=^/foo`,
187187
},
188188
accessSubPath: "/foo",
189-
pageResult: "URI: /foo\n",
189+
pageResult: "NOW:",
190190
},
191191
{
192192
name: "bypass-auth-except-bypassed",
@@ -195,7 +195,7 @@ func TestOAuthProxyE2E(t *testing.T) {
195195
`--bypass-auth-except-for=^/foo`,
196196
},
197197
accessSubPath: "/bar",
198-
pageResult: "URI: /bar",
198+
pageResult: "NOW:",
199199
bypass: true,
200200
},
201201
}
@@ -227,7 +227,7 @@ func TestOAuthProxyE2E(t *testing.T) {
227227
openshiftTransport, err := rest.TransportFor(testConfig)
228228
require.NoError(t, err)
229229

230-
backendImage := "nginxdemos/nginx-hello:plain-text"
230+
backendImage := "registry.k8s.io/e2e-test-images/agnhost:2.56"
231231

232232
upstreamCA, upstreamCert, upstreamKey, err := createCAandCertSet("localhost")
233233
require.NoError(t, err, "Error creating upstream TLS certificates")

test/e2e/util.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,8 @@ func newOAuthProxyPod(proxyImage, backendImage string, suffix string, extraProxy
780780
},
781781
{
782782
Image: backendImage,
783-
Name: "hello-openshift",
783+
Name: "agnhost",
784+
Args: []string{"netexec", "--http-port=8080"},
784785
SecurityContext: &v1.SecurityContext{
785786
AllowPrivilegeEscalation: pointer.Bool(false),
786787
Capabilities: &v1.Capabilities{Drop: []v1.Capability{"ALL"}},

0 commit comments

Comments
 (0)