Skip to content

Commit

Permalink
Test SOSAPI PUTs with a bucket having a dot in its name
Browse files Browse the repository at this point in the history
This allows to test that the custom route is accepting such
buckets.

Issue: ZENKO-4889
  • Loading branch information
williamlardier committed Oct 25, 2024
1 parent 925e86d commit 2ea3b4e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/ctst/common/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,22 @@ Given('an account', async function (this: Zenko) {
await this.createAccount();
});

Given('a {string} bucket with dot', async function (this: Zenko, versioning: string) {
this.resetCommand();
const preName = this.getSaved<string>('accountName') ||
this.parameters.AccountName || Constants.ACCOUNT_NAME;
const bucketName = `${preName}.${Constants.BUCKET_NAME_TEST}${Utils.randomString()}`.toLocaleLowerCase();
this.addToSaved('bucketName', bucketName);
this.addCommandParameter({ bucket: bucketName });
await S3.createBucket(this.getCommandParameters());
this.addToSaved('bucketVersioning', versioning);
if (versioning !== 'Non versioned') {
const versioningConfiguration = versioning === 'Versioned' ? 'Enabled' : 'Suspended';
this.addCommandParameter({ versioningConfiguration: `Status=${versioningConfiguration}` });
await S3.putBucketVersioning(this.getCommandParameters());
}
});

Given('a {string} bucket', async function (this: Zenko, versioning: string) {
this.resetCommand();
const preName = this.getSaved<string>('accountName') ||
Expand Down
15 changes: 15 additions & 0 deletions tests/ctst/features/sosapi.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,18 @@ Feature: Veeam SOSAPI
| Non versioned | invalid | capacity.xml | not accepted |
| Non versioned | valid | system.xml | accepted |
| Non versioned | invalid | system.xml | not accepted |

@2.6.0
@PreMerge
@SOSAPI
Scenario Outline: PUT routes for SOSAPI configuration files
Given a "<versioningConfiguration>" bucket with dot
When I PUT the "<isValid>" "<sosapiFile>" XML file
Then the request should be "<requestAccepted>"

Examples:
| versioningConfiguration | isValid | sosapiFile | requestAccepted |
| Non versioned | valid | capacity.xml | accepted |
| Non versioned | invalid | capacity.xml | not accepted |
| Non versioned | valid | system.xml | accepted |
| Non versioned | invalid | system.xml | not accepted |

0 comments on commit 2ea3b4e

Please sign in to comment.