Skip to content

Commit a4528f1

Browse files
committed
CLDSRV-825: align functional tests after Ceph support removal
Remove Ceph-specific skip logic and behavior branches from multiple-backend/functional suites, fix mocha global shadowing regressions, and clean stale Ceph comments in test files.
1 parent e6a1b7a commit a4528f1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+101
-176
lines changed
Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
const { config } = require('../../../../../lib/Config');
22

3-
const isCEPH = process.env.CI_CEPH !== undefined;
4-
const itSkipCeph = isCEPH ? it.skip : it;
5-
const describeSkipIfCeph = isCEPH ? describe.skip : describe.skip; // always skip
63
let describeSkipIfNotMultiple = describe.skip;
7-
let describeSkipIfNotMultipleOrCeph = describe.skip;
84

95
if (config.backends.data === 'multiple') {
106
describeSkipIfNotMultiple = describe;
11-
describeSkipIfNotMultipleOrCeph = isCEPH ? describe.skip : describe.skip; // always skip
127
}
138

149
function hasLocation(lc) {
@@ -24,11 +19,7 @@ function hasLocation(lc) {
2419
const hasColdStorage = config.supportedLifecycleRules.some(rule => rule.endsWith('Transition'));
2520

2621
module.exports = {
27-
isCEPH,
28-
itSkipCeph,
29-
describeSkipIfCeph,
3022
describeSkipIfNotMultiple,
31-
describeSkipIfNotMultipleOrCeph,
3223
hasLocation,
3324
hasColdStorage,
3425
};

tests/functional/aws-node-sdk/test/multipleBackend/delete/deleteAwsVersioning.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ const {
2828
awsGetLatestVerId,
2929
getAwsRetry,
3030
genUniqID,
31-
isCEPH,
3231
waitForVersioningBeforePut,
3332
} = require('../utils');
3433

@@ -206,7 +205,7 @@ describeSkipIfNotMultiple('AWS backend delete object w. versioning: ' +
206205
key, versionId: 'null', resultType: deleteVersion },
207206
err => next(err, awsVerId)),
208207
(awsVerId, next) => {
209-
const wanted = isCEPH ? 'NoSuchKey' : 'NoSuchVersion';
208+
const wanted = 'NoSuchVersion';
210209
_awsGetAssertDeleted({ key,
211210
versionId: awsVerId, errorCode: wanted }, next);
212211
},
@@ -243,7 +242,7 @@ describeSkipIfNotMultiple('AWS backend delete object w. versioning: ' +
243242
key, versionId: 'null', resultType: deleteVersion },
244243
err => next(err, awsVerId)),
245244
(awsVerId, next) => {
246-
const wanted = isCEPH ? 'NoSuchKey' : 'NoSuchVersion';
245+
const wanted = 'NoSuchVersion';
247246
_awsGetAssertDeleted({ key,
248247
versionId: awsVerId, errorCode: wanted }, next);
249248
},
@@ -263,7 +262,7 @@ describeSkipIfNotMultiple('AWS backend delete object w. versioning: ' +
263262
key, versionId: s3VerId, resultType: deleteVersion },
264263
err => next(err, awsVerId)),
265264
(awsVerId, next) => {
266-
const wanted = isCEPH ? 'NoSuchKey' : 'NoSuchVersion';
265+
const wanted = 'NoSuchVersion';
267266
_awsGetAssertDeleted({ key,
268267
versionId: awsVerId, errorCode: wanted }, next);
269268
},
@@ -525,7 +524,7 @@ describeSkipIfNotMultiple('AWS backend delete object w. versioning: ' +
525524
(awsVid, next) => _getAssertDeleted(s3, { key,
526525
errorCode: 'NoSuchKey' }, () => next(null, awsVid)),
527526
(awsVerId, next) => {
528-
const wanted = isCEPH ? 'NoSuchKey' : 'NoSuchVersion';
527+
const wanted = 'NoSuchVersion';
529528
_awsGetAssertDeleted({ key,
530529
versionId: awsVerId, errorCode: wanted }, next);
531530
},
@@ -682,7 +681,7 @@ describeSkipIfNotMultiple('AWS backend delete multiple objects w. versioning: '
682681
key, versionId: 'null', resultType: deleteVersion },
683682
err => next(err, awsVerId)),
684683
(awsVerId, next) => {
685-
const wanted = isCEPH ? 'NoSuchKey' : 'NoSuchVersion';
684+
const wanted = 'NoSuchVersion';
686685
_awsGetAssertDeleted({ key,
687686
versionId: awsVerId, errorCode: wanted }, next);
688687
},
@@ -700,7 +699,7 @@ describeSkipIfNotMultiple('AWS backend delete multiple objects w. versioning: '
700699
key, versionId: 'null', resultType: deleteVersion },
701700
err => next(err, awsVerId)),
702701
(awsVerId, next) => {
703-
const wanted = isCEPH ? 'NoSuchKey' : 'NoSuchVersion';
702+
const wanted = 'NoSuchVersion';
704703
_awsGetAssertDeleted({ key,
705704
versionId: awsVerId, errorCode: wanted }, next);
706705
},
@@ -720,7 +719,7 @@ describeSkipIfNotMultiple('AWS backend delete multiple objects w. versioning: '
720719
key, versionId: s3VerId, resultType: deleteVersion },
721720
err => next(err, awsVerId)),
722721
(awsVerId, next) => {
723-
const wanted = isCEPH ? 'NoSuchKey' : 'NoSuchVersion';
722+
const wanted = 'NoSuchVersion';
724723
_awsGetAssertDeleted({ key,
725724
versionId: awsVerId, errorCode: wanted }, next);
726725
},

tests/functional/aws-node-sdk/test/multipleBackend/delete/deleteAzure.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const { CreateBucketCommand,
99
const BucketUtility = require('../../../lib/utility/bucket-util');
1010
const withV4 = require('../../support/withV4');
1111
const {
12-
describeSkipIfNotMultipleOrCeph,
12+
describeSkipIfNotMultiple,
1313
uniqName,
1414
getAzureClient,
1515
getAzureContainerName,
@@ -30,7 +30,7 @@ const nonExistingId = process.env.AWS_ON_AIR ?
3030
'MhhyTHhmZ4cxSi4Y9SMe5P7UJAz7HLJ9' :
3131
'3939393939393939393936493939393939393939756e6437';
3232

33-
describeSkipIfNotMultipleOrCeph('Multiple backend delete object from Azure',
33+
describeSkipIfNotMultiple('Multiple backend delete object from Azure',
3434
function testSuite() {
3535
this.timeout(250000);
3636
withV4(sigCfg => {

tests/functional/aws-node-sdk/test/multipleBackend/delete/deleteGcp.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const { CreateBucketCommand,
66
const withV4 = require('../../support/withV4');
77
const BucketUtility = require('../../../lib/utility/bucket-util');
88
const {
9-
describeSkipIfNotMultipleOrCeph,
9+
describeSkipIfNotMultiple,
1010
gcpLocation,
1111
gcpLocationMismatch,
1212
genUniqID,
@@ -20,7 +20,7 @@ const mismatchObject = `mismatchObject-${genUniqID()}`;
2020
const body = Buffer.from('I am a body', 'utf8');
2121
const bigBody = Buffer.alloc(10485760);
2222

23-
describeSkipIfNotMultipleOrCeph('Multiple backend delete',
23+
describeSkipIfNotMultiple('Multiple backend delete',
2424
function testSuite() {
2525
this.timeout(120000);
2626
withV4(sigCfg => {

tests/functional/aws-node-sdk/test/multipleBackend/get/getGcp.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const { PutObjectCommand,
55
CreateBucketCommand } = require('@aws-sdk/client-s3');
66
const BucketUtility = require('../../../lib/utility/bucket-util');
77
const {
8-
describeSkipIfNotMultipleOrCeph,
8+
describeSkipIfNotMultiple,
99
gcpLocation,
1010
gcpLocationMismatch,
1111
genUniqID,
@@ -53,7 +53,7 @@ describe('Multiple backend get object', function testSuite() {
5353
});
5454
});
5555

56-
describeSkipIfNotMultipleOrCeph('with objects in GCP', () => {
56+
describeSkipIfNotMultiple('with objects in GCP', () => {
5757
before(() => {
5858
process.stdout.write('Putting object to GCP\n');
5959
return s3.send(new PutObjectCommand({ Bucket: bucket, Key: gcpObject,
@@ -128,7 +128,7 @@ describe('Multiple backend get object', function testSuite() {
128128
});
129129
});
130130

131-
describeSkipIfNotMultipleOrCeph('with bucketMatch set to false', () => {
131+
describeSkipIfNotMultiple('with bucketMatch set to false', () => {
132132
beforeEach(done => {
133133
s3.send(new PutObjectCommand({ Bucket: bucket, Key: mismatchObject, Body: body,
134134
Metadata: { 'scal-location-constraint': gcpLocationMismatch } })).then(() => {

tests/functional/aws-node-sdk/test/multipleBackend/initMPU/initMPUAzure.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const {
99

1010
const withV4 = require('../../support/withV4');
1111
const BucketUtility = require('../../../lib/utility/bucket-util');
12-
const { describeSkipIfNotMultipleOrCeph, azureLocation, getAzureContainerName,
12+
const { describeSkipIfNotMultiple, azureLocation, getAzureContainerName,
1313
genUniqID } = require('../utils');
1414

1515
const keyName = `somekey-${genUniqID()}`;
@@ -18,7 +18,7 @@ const azureContainerName = getAzureContainerName(azureLocation);
1818
let s3;
1919
let bucketUtil;
2020

21-
describeSkipIfNotMultipleOrCeph('Initiate MPU to AZURE', () => {
21+
describeSkipIfNotMultiple('Initiate MPU to AZURE', () => {
2222
withV4(sigCfg => {
2323
beforeEach(() => {
2424
bucketUtil = new BucketUtility('default', sigCfg);

tests/functional/aws-node-sdk/test/multipleBackend/initMPU/initMPUGcp.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const {
1010

1111
const withV4 = require('../../support/withV4');
1212
const BucketUtility = require('../../../lib/utility/bucket-util');
13-
const { describeSkipIfNotMultipleOrCeph, gcpClient, gcpBucketMPU, gcpLocation,
13+
const { describeSkipIfNotMultiple, gcpClient, gcpBucketMPU, gcpLocation,
1414
genUniqID } = require('../utils');
1515
const { createMpuKey } = arsenal.storage.data.external.GcpUtils;
1616

@@ -20,7 +20,7 @@ const keyName = `somekey-${genUniqID()}`;
2020
let s3;
2121
let bucketUtil;
2222

23-
describeSkipIfNotMultipleOrCeph('Initiate MPU to GCP', () => {
23+
describeSkipIfNotMultiple('Initiate MPU to GCP', () => {
2424
withV4(sigCfg => {
2525
beforeEach(() => {
2626
bucketUtil = new BucketUtility('default', sigCfg);

tests/functional/aws-node-sdk/test/multipleBackend/listParts/azureListParts.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const { CreateBucketCommand,
77

88
const withV4 = require('../../support/withV4');
99
const BucketUtility = require('../../../lib/utility/bucket-util');
10-
const { describeSkipIfNotMultipleOrCeph, azureLocation, getAzureContainerName,
10+
const { describeSkipIfNotMultiple, azureLocation, getAzureContainerName,
1111
genUniqID } = require('../utils');
1212

1313
const azureContainerName = getAzureContainerName(azureLocation);
@@ -19,7 +19,7 @@ const bodySecondPart = Buffer.alloc(secondPartSize);
1919
let bucketUtil;
2020
let s3;
2121

22-
describeSkipIfNotMultipleOrCeph('List parts of MPU on Azure data backend',
22+
describeSkipIfNotMultiple('List parts of MPU on Azure data backend',
2323
() => {
2424
withV4(sigCfg => {
2525
beforeEach(function beforeEachFn() {

tests/functional/aws-node-sdk/test/multipleBackend/listParts/listPartsGcp.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const { CreateBucketCommand,
66
ListPartsCommand } = require('@aws-sdk/client-s3');
77
const withV4 = require('../../support/withV4');
88
const BucketUtility = require('../../../lib/utility/bucket-util');
9-
const { describeSkipIfNotMultipleOrCeph, gcpLocation, genUniqID }
9+
const { describeSkipIfNotMultiple, gcpLocation, genUniqID }
1010
= require('../utils');
1111

1212
const bucket = `listpartsgcp${genUniqID()}`;
@@ -18,7 +18,7 @@ const bodySecondPart = Buffer.alloc(secondPartSize);
1818
let bucketUtil;
1919
let s3;
2020

21-
describeSkipIfNotMultipleOrCeph('List parts of MPU on GCP data backend', () => {
21+
describeSkipIfNotMultiple('List parts of MPU on GCP data backend', () => {
2222
withV4(sigCfg => {
2323
beforeEach(function beforeEachFn() {
2424
this.currentTest.key = `somekey-${genUniqID()}`;

tests/functional/aws-node-sdk/test/multipleBackend/mpuAbort/abortMPUGcp.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const {
1111

1212
const withV4 = require('../../support/withV4');
1313
const BucketUtility = require('../../../lib/utility/bucket-util');
14-
const { describeSkipIfNotMultipleOrCeph, gcpClient, gcpBucket, gcpBucketMPU,
14+
const { describeSkipIfNotMultiple, gcpClient, gcpBucket, gcpBucketMPU,
1515
gcpLocation, uniqName, genUniqID } = require('../utils');
1616

1717
const keyObject = 'abortgcp';
@@ -38,7 +38,7 @@ function checkMPUList(bucket, key, uploadId, cb) {
3838
});
3939
}
4040

41-
describeSkipIfNotMultipleOrCeph('Abort MPU on GCP data backend', function
41+
describeSkipIfNotMultiple('Abort MPU on GCP data backend', function
4242
descrbeFn() {
4343
this.timeout(180000);
4444
withV4(sigCfg => {

0 commit comments

Comments
 (0)