Skip to content

Commit

Permalink
Merge branch 'w/2.7/improvement/ZENKO-4889' into tmp/octopus/w/2.8/im…
Browse files Browse the repository at this point in the history
…provement/ZENKO-4889
  • Loading branch information
bert-e committed Oct 25, 2024
2 parents c4ab63c + 58f5471 commit 8fc7794
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 11 deletions.
33 changes: 22 additions & 11 deletions tests/ctst/common/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,20 +105,31 @@ Given('an account', async function (this: Zenko) {
await this.createAccount();
});

Given('a {string} bucket', 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);
async function createBucket(world: Zenko, versioning: string, bucketName: string) {
world.resetCommand();
world.addToSaved('bucketName', bucketName);
world.addCommandParameter({ bucket: bucketName });
await S3.createBucket(world.getCommandParameters());
world.addToSaved('bucketVersioning', versioning);
if (versioning !== 'Non versioned') {
const versioningConfiguration = versioning === 'Versioned' ? 'Enabled' : 'Suspended';
this.addCommandParameter({ versioningConfiguration: `Status=${versioningConfiguration}` });
await S3.putBucketVersioning(this.getCommandParameters());
world.addCommandParameter({ versioningConfiguration: `Status=${versioningConfiguration}` });
await S3.putBucketVersioning(world.getCommandParameters());
}
}

Given('a {string} bucket with dot', async function (this: Zenko, versioning: string) {
const preName = this.getSaved<string>('accountName') ||
this.parameters.AccountName || Constants.ACCOUNT_NAME;
await createBucket(this, versioning,
`${preName}.${Constants.BUCKET_NAME_TEST}${Utils.randomString()}`.toLocaleLowerCase());
});

Given('a {string} bucket', async function (this: Zenko, versioning: string) {
const preName = this.getSaved<string>('accountName') ||
this.parameters.AccountName || Constants.ACCOUNT_NAME;
await createBucket(this, versioning,
`${preName}${Constants.BUCKET_NAME_TEST}${Utils.randomString()}`.toLocaleLowerCase());
});

Given('an existing bucket {string} {string} versioning, {string} ObjectLock {string} retention mode', async function
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 8fc7794

Please sign in to comment.