Skip to content

Commit 379eb09

Browse files
authored
simplify e2e tests
Signed-off-by: Malthe Poulsen <30603252+malpou@users.noreply.github.com>
1 parent 003c048 commit 379eb09

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

tests/checks/placeholder_pages/placeholder_pages_test.go

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,6 @@ spec:
127127
// Give pod time to fully initialize
128128
_, _ = ExecuteCommand("sleep 5")
129129

130-
// Wait for deployment to be at 0 replicas (since min is 0)
131-
assert.True(t, WaitForDeploymentReplicaReadyCount(t, kc, testName, testNamespace, 0, 6, 10),
132-
"deployment should be at 0 replicas")
133-
134130
// Test placeholder response
135131
testPlaceholderResponse(t, kc)
136132

@@ -187,8 +183,8 @@ spec:
187183
content: |
188184
<html>
189185
<body>
190-
<h1>Custom placeholder for {{ "{{" }}.ServiceName{{ "}}" }}</h1>
191-
<p>Please wait...</p>
186+
<h1>Service is starting - custom page</h1>
187+
<p>This is a test placeholder page.</p>
192188
</body>
193189
</html>
194190
`
@@ -197,7 +193,7 @@ spec:
197193
defer KubectlDeleteWithTemplate(t, data, "custom-placeholder", customTemplate)
198194

199195
// Give time for the new HTTPScaledObject to be processed
200-
_, _ = ExecuteCommand("sleep 5")
196+
_, _ = ExecuteCommand("sleep 10")
201197

202198
// Make request to custom placeholder
203199
curlCmd := fmt.Sprintf("curl -s -H 'Host: %s-custom.test' http://keda-add-ons-http-interceptor-proxy.keda:8080/", testName)
@@ -210,8 +206,8 @@ spec:
210206
assert.NoError(t, err, "curl command should succeed")
211207

212208
// Verify custom content is there
213-
assert.Contains(t, stdout, "Custom placeholder for", "should have custom placeholder content")
214-
assert.Contains(t, stdout, "Please wait...", "should have custom message")
209+
assert.Contains(t, stdout, "Service is starting - custom page", "should have custom placeholder content")
210+
assert.Contains(t, stdout, "This is a test placeholder page.", "should have custom message")
215211

216212
// Verify script was injected
217213
assert.Contains(t, stdout, "checkServiceStatus", "should have injected checkServiceStatus function")

0 commit comments

Comments
 (0)