Skip to content

Commit 3ceb257

Browse files
committed
✅ run test only if vault is available
Issue: CLDSRV-813
1 parent 16dbb8b commit 3ceb257

File tree

1 file changed

+5
-2
lines changed
  • tests/functional/aws-node-sdk/test/bucket

1 file changed

+5
-2
lines changed

tests/functional/aws-node-sdk/test/bucket/get.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ const { IAM } = AWS;
1212
const getConfig = require('../support/config');
1313
const { config } = require('../../../../../lib/Config');
1414

15+
const isVaultScality = config.backends.auth !== 'mem';
16+
const internalPortBypassBP = config.internalPort;
1517
const vaultHost = config.vaultd?.host || 'localhost';
1618

1719
const tests = [
@@ -497,7 +499,8 @@ describe('GET Bucket - AWS.S3.listObjects', () => {
497499
});
498500
});
499501

500-
describe('x-amz-optional-attributes header', () => {
502+
const describeBypass = isVaultScality && internalPortBypassBP ? describe : describe.skip;
503+
describeBypass('x-amz-optional-attributes header', () => {
501504
let policyWithoutPermission;
502505
let userWithoutPermission;
503506
let s3ClientWithoutPermission;
@@ -630,7 +633,7 @@ describe('GET Bucket - AWS.S3.listObjects', () => {
630633
}).promise();
631634

632635
try {
633-
const result = await listObjectsV2WithOptionalAttributes(
636+
await listObjectsV2WithOptionalAttributes(
634637
s3ClientWithoutPermission,
635638
Bucket,
636639
'x-amz-meta-*,RestoreStatus,x-amz-meta-department',

0 commit comments

Comments
 (0)