Skip to content

Commit

Permalink
Generalize cronjob step logic
Browse files Browse the repository at this point in the history
Issue: ZENKO-4871
  • Loading branch information
williamlardier committed Sep 6, 2024
1 parent 63cee3b commit fb5da6e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion tests/ctst/features/pra.feature
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Feature: PRA operations
And object "obj-1" should "" be "transitioned" and have the storage class "e2e-cold" on "DR" site

# Test the readonly
When the "EnsureVaultSeeds" cronjobs completes without error on "Primary" site
When the "vault-check-seeds" cronjobs completes without error on "Primary" site
And the DATA_ACCESSOR user tries to perform PutObject on "DR" site
Then it "should not" pass Vault authentication

Expand Down
2 changes: 1 addition & 1 deletion tests/ctst/features/quotas/CountItems.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ Feature: CountItems measures the utilization metrics
Scenario Outline: Countitems runs without error and compute utilization metrics
Given an existing bucket "" "without" versioning, "without" ObjectLock "without" retention mode
And an object "" that "exists"
When the "CountItems" cronjobs completes without error
When the "count-items" cronjobs completes without error
Then the operation finished without error
11 changes: 1 addition & 10 deletions tests/ctst/steps/cronjobs/countItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,7 @@ async function runCronjob(this: Zenko, job: string, site?: string) {
zenkoName += '-pra';
}

switch (job) {
case 'CountItems':
await createJobAndWaitForCompletion(this, `${zenkoName}-ops-count-items`);
break;
case 'EnsureVaultSeeds':
await createJobAndWaitForCompletion(this, `${zenkoName}-ops-vault-check-seeds`);
break;
default:
throw new Error(`Unknown job: ${job}`);
}
await createJobAndWaitForCompletion(this, `${zenkoName}-ops-${job}`);
}

When('the {string} cronjobs completes without error', { timeout: 1200000 }, async function (this: Zenko, job: string) {
Expand Down

0 comments on commit fb5da6e

Please sign in to comment.