@@ -14,17 +14,15 @@ interface ReportingUsageResponse {
1414 accounts : Record < string , Record < string , LocationUsage > > ;
1515}
1616
17- When ( 'the user retrieves the storage usage report' ,
18- async function ( this : Zenko ) {
17+ When ( 'the user retrieves the storage usage report' , async function ( this : Zenko ) {
1918 const result = await this . managementAPIRequest (
2019 'GET' ,
2120 `/instance/${ this . parameters . InstanceID } /reporting/usage` ,
2221 ) ;
2322 this . addToSaved ( 'reportingResponse' , result ) ;
2423 } ) ;
2524
26- When ( 'the user retrieves the storage usage report as a data consumer user' ,
27- async function ( this : Zenko ) {
25+ When ( 'the user retrieves the storage usage report as a data consumer user' , async function ( this : Zenko ) {
2826 const result = await this . managementAPIRequest (
2927 'GET' ,
3028 `/instance/${ this . parameters . InstanceID } /reporting/usage` ,
@@ -35,15 +33,13 @@ When('the user retrieves the storage usage report as a data consumer user',
3533 this . addToSaved ( 'reportingResponse' , result ) ;
3634 } ) ;
3735
38- Then ( 'the storage usage report http response code is {int}' ,
39- function ( this : Zenko , expectedStatus : number ) {
36+ Then ( 'the storage usage report http response code is {int}' , function ( this : Zenko , expectedStatus : number ) {
4037 const response = this . getSaved < { statusCode : number } > ( 'reportingResponse' ) ;
4138 assert . strictEqual ( response . statusCode , expectedStatus ,
4239 `Expected status ${ expectedStatus } but got ${ response . statusCode } ` ) ;
4340 } ) ;
4441
45- Then ( 'the storage usage report response has a valid structure' ,
46- function ( this : Zenko ) {
42+ Then ( 'the storage usage report response has a valid structure' , function ( this : Zenko ) {
4743 const response = this . getSaved < { statusCode : number ; data : ReportingUsageResponse } > (
4844 'reportingResponse' ) ;
4945 const data = response . data ;
@@ -55,8 +51,7 @@ Then('the storage usage report response has a valid structure',
5551 'accounts should be an object' ) ;
5652 } ) ;
5753
58- Then ( 'the storage usage report contains the additional accounts' ,
59- async function ( this : Zenko ) {
54+ Then ( 'the storage usage report contains the additional accounts' , async function ( this : Zenko ) {
6055 const response = this . getSaved < { statusCode : number ; data : ReportingUsageResponse } > (
6156 'reportingResponse' ) ;
6257 const accountNames = this . getSavedIdentities ( )
@@ -68,8 +63,7 @@ Then('the storage usage report contains the additional accounts',
6863 }
6964 } ) ;
7065
71- Then ( 'the storage usage report contains the test account with location {string}' ,
72- async function ( this : Zenko , locationName : string ) {
66+ Then ( 'the storage usage report contains the test account with location {string}' , async function ( this : Zenko , locationName : string ) {
7367 const response = this . getSaved < { statusCode : number ; data : ReportingUsageResponse } > (
7468 'reportingResponse' ) ;
7569 const accountName = this . getSaved < string > ( 'accountName' ) ;
@@ -84,8 +78,7 @@ Then('the storage usage report contains the test account with location {string}'
8478 this . addToSaved ( 'reportedLocationUsage' , accountData [ locationName ] ) ;
8579 } ) ;
8680
87- Then ( 'the location metrics show {int} objects and {int} bytes' ,
88- function ( this : Zenko , expectedObjects : number , expectedBytes : number ) {
81+ Then ( 'the location metrics show {int} objects and {int} bytes' , function ( this : Zenko , expectedObjects : number , expectedBytes : number ) {
8982 const usage = this . getSaved < LocationUsage > ( 'reportedLocationUsage' ) ;
9083 assert . strictEqual ( usage . objectsTotal , expectedObjects ,
9184 `Expected ${ expectedObjects } objects but got ${ usage . objectsTotal } ` ) ;
0 commit comments