diff --git a/.github/workflows/end2end.yaml b/.github/workflows/end2end.yaml index 5900f3ad2d..9696ce214f 100644 --- a/.github/workflows/end2end.yaml +++ b/.github/workflows/end2end.yaml @@ -404,6 +404,9 @@ jobs: - name: Lint ctst tests working-directory: tests/ctst run: yarn lint + - name: Check for unused step definitions + working-directory: tests/ctst + run: yarn unused-steps - name: Set up Docker Buildx uses: docker/setup-buildx-action@v4 - name: Login to Registry diff --git a/tests/ctst/common/common.ts b/tests/ctst/common/common.ts index 7bf8345081..f12828fcae 100644 --- a/tests/ctst/common/common.ts +++ b/tests/ctst/common/common.ts @@ -202,12 +202,6 @@ Given('{int} objects {string} of size {int} bytes with user metadata {string}', assert.ifError(result?.stderr || result?.err); }); -Given('{int} mpu objects {string} of size {int} bytes with user metadata {string}', - async function (this: Zenko, numberObjects: number, objectName: string, sizeBytes: number, userMD: string) { - const result = await addMultipleObjects.call(this, numberObjects, objectName, sizeBytes, userMD); - assert.ifError(result?.stderr || result?.err); - }); - Given('a tag on object {string} with key {string} and value {string}', async function (this: Zenko, objectName: string, tagKey: string, tagValue: string) { this.resetCommand(); diff --git a/tests/ctst/package.json b/tests/ctst/package.json index 302dd188c9..c934e05912 100644 --- a/tests/ctst/package.json +++ b/tests/ctst/package.json @@ -37,7 +37,8 @@ }, "scripts": { "build": "tsc --build tsconfig.json", - "lint": "eslint ." + "lint": "eslint .", + "unused-steps": "! cucumber-js --config cucumber.config.cjs --dry-run --format usage 2>&1 | grep UNUSED" }, "resolutions": { "@azure/core-client": "1.10.1" diff --git a/tests/ctst/steps/azureArchive.ts b/tests/ctst/steps/azureArchive.ts index 2afe603643..187390e0cc 100644 --- a/tests/ctst/steps/azureArchive.ts +++ b/tests/ctst/steps/azureArchive.ts @@ -482,14 +482,3 @@ When('i change azure archive location {string} container target', { timeout: 15 await waitForZenkoToStabilize(this, true); await waitForDataServicesToStabilize(this); }); - -Then('i can get the {string} location details', async function (this: Zenko, locationName: string) { - const result = await this.managementAPIRequest('GET', `/config/overlay/view/${this.parameters.InstanceID}`); - if ('err' in result) { - assert.ifError(result.err); - } - if ('data' in result) { - const { locations } = result.data as { locations: Record }; - assert(locations[locationName]); - } -}); diff --git a/tests/ctst/steps/pra.ts b/tests/ctst/steps/pra.ts index 4542658ce0..50636d5018 100644 --- a/tests/ctst/steps/pra.ts +++ b/tests/ctst/steps/pra.ts @@ -182,17 +182,6 @@ Given('a DR installed', { timeout: installTimeout + 2000 }, async function (this return; }); -Given('a DR failing to be installed', { timeout: 130000 }, async function (this: Zenko) { - Identity.useIdentity(IdentityEnum.ACCOUNT, Zenko.sites['source'].accountName); - const credentials = Identity.getCurrentCredentials(); - await createSecret(this, 'drctl-s3-creds', { - accessKey: Buffer.from(credentials.accessKeyId).toString('base64'), - secretAccessKey: Buffer.from(credentials.secretAccessKey).toString('base64'), - }); - await installPRA(this, 'http://s3.dr.zenko.local'); - return; -}); - Then('the DR sink should be in phase {string}', { timeout: 360000 }, async function (this: Zenko, state: string) { let targetPhase; switch (state) {