Skip to content

Commit 12e1e09

Browse files
committed
Fix lint errors in storage usage reporting steps
Disable camelcase rule for role-to-username map keys (must match Keycloak usernames). Shorten step names and parameter names to stay within 120-char line limit. Issue: ZENKO-5202
1 parent de88031 commit 12e1e09

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

tests/ctst/features/reporting/StorageUsageReporting.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ Feature: Storage Usage Reporting API
4141
Given the environment is set up with bucket created, test data uploaded, and count-items ran
4242
When the user retrieves the storage usage report as "storage_manager"
4343
Then the storage usage report http response code is 200
44-
And the storage usage report contains the test account with location "<locationName>"
45-
And the location metrics show 3 objects and 600 bytes
44+
And the report contains the test account with location "<locationName>"
45+
And the report shows 3 objects and 600 bytes
4646

4747
Examples:
4848
| locationName |

tests/ctst/steps/reporting/storageUsageReporting.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ interface ReportingUsageResponse {
1515
}
1616

1717
const roleToWorldParam: Record<string, keyof Zenko['parameters']> = {
18+
/* eslint-disable camelcase */
1819
storage_manager: 'StorageManagerUsername',
1920
data_consumer: 'DataConsumerUsername',
2021
storage_account_owner: 'StorageAccountOwnerUsername',
22+
/* eslint-enable camelcase */
2123
};
2224

2325
When('the user retrieves the storage usage report as {string}', async function (this: Zenko, role: string) {
@@ -63,7 +65,7 @@ Then('the storage usage report contains the additional accounts', async function
6365
}
6466
});
6567

66-
Then('the storage usage report contains the test account with location {string}', async function (this: Zenko, locationName: string) {
68+
Then('the report contains the test account with location {string}', async function (this: Zenko, locationName: string) {
6769
const response = this.getSaved<{ statusCode: number; data: ReportingUsageResponse }>(
6870
'reportingResponse');
6971
const accountName = this.getSaved<string>('accountName');
@@ -78,10 +80,10 @@ Then('the storage usage report contains the test account with location {string}'
7880
this.addToSaved('reportedLocationUsage', accountData[locationName]);
7981
});
8082

81-
Then('the location metrics show {int} objects and {int} bytes', function (this: Zenko, expectedObjects: number, expectedBytes: number) {
83+
Then('the report shows {int} objects and {int} bytes', function (this: Zenko, objects: number, bytes: number) {
8284
const usage = this.getSaved<LocationUsage>('reportedLocationUsage');
83-
assert.strictEqual(usage.objectsTotal, expectedObjects,
84-
`Expected ${expectedObjects} objects but got ${usage.objectsTotal}`);
85-
assert.strictEqual(usage.bytesTotal, expectedBytes,
86-
`Expected ${expectedBytes} bytes but got ${usage.bytesTotal}`);
85+
assert.strictEqual(usage.objectsTotal, objects,
86+
`Expected ${objects} objects but got ${usage.objectsTotal}`);
87+
assert.strictEqual(usage.bytesTotal, bytes,
88+
`Expected ${bytes} bytes but got ${usage.bytesTotal}`);
8789
});

0 commit comments

Comments
 (0)