Skip to content

Commit 345e3be

Browse files
committed
fix(ci): wait for operator reconciliation in bucket website test
The "Bucket Website CRUD" test was flaky in CI (ctst-end2end-sharded): after adding a website endpoint to the overlay, the test immediately tried to fetch the website within a 60-second retry window. However, the overlay change triggers a zenko-operator reconciliation cascade (rolling restarts of ops-scuba → ops-scuba-external-api → connector-cloudserver → ingress creation), which takes 60-95 seconds. The test was racing the reconciliation and often lost. Wait for the operator to finish reconciling before attempting to fetch, using waitForZenkoToStabilize (waits for DeploymentInProgress=True then Available=True) and waitForDataServicesToStabilize (waits for dependent deployments to roll out). This matches the pattern already used by the azure archive tests after overlay changes. The cucumber step timeout is raised from the default 100s to 15 minutes to accommodate the wait functions, consistent with the azure archive step timeouts. Also fix a stale assertion message ("after 20 tries" → "after 60 tries"). Issue: ZENKO-5245
1 parent a8ffb80 commit 345e3be

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

tests/ctst/steps/website/website.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import assert from 'assert';
22
import { Given, When, Then } from '@cucumber/cucumber';
33
import Zenko from '../../world/Zenko';
44
import { putObject } from '../utils/utils';
5+
import { waitForZenkoToStabilize, waitForDataServicesToStabilize } from '../utils/kubernetes';
56
import { S3, Utils } from 'cli-testing';
67

78
const pageMessage = Utils.randomString();
@@ -29,9 +30,12 @@ When('the user puts the bucket website configuration', async function (this: Zen
2930
});
3031
});
3132

32-
When('the {string} endpoint is added to the overlay', async function (this: Zenko, endpoint: string) {
33-
await this.addWebsiteEndpoint(endpoint);
34-
});
33+
When('the {string} endpoint is added to the overlay', { timeout: 15 * 60 * 1000 },
34+
async function (this: Zenko, endpoint: string) {
35+
await this.addWebsiteEndpoint(endpoint);
36+
await waitForZenkoToStabilize(this, true);
37+
await waitForDataServicesToStabilize(this);
38+
});
3539

3640
When('the user creates an S3 Bucket policy granting public read access', async function (this: Zenko) {
3741
const policy = {
@@ -82,5 +86,5 @@ Then('the user should be able to load the index.html file from the {string} endp
8286
await Utils.sleep(1000);
8387
}
8488
}
85-
assert.fail('Failed to fetch the bucket website after 20 tries');
89+
assert.fail('Failed to fetch the bucket website after 60 tries');
8690
});

0 commit comments

Comments
 (0)