Skip to content

Commit 3227927

Browse files
committed
Merge branches 'w/9.1/improvement/CLDSRV-717-unify-tests' and 'q/w/5920/9.0/improvement/CLDSRV-717-unify-tests' into tmp/octopus/q/9.1
3 parents 6bc8b15 + e3c0b5a + 6667d47 commit 3227927

File tree

6 files changed

+19
-8
lines changed

6 files changed

+19
-8
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,10 @@ describe('aws-node-sdk test putBucketReplication bucket status', () => {
126126
it('should put configuration on a bucket with versioning', done =>
127127
checkVersioningError(s3, 'Enabled', null, done));
128128

129-
it('should put configuration on a bucket with versioning if ' +
129+
// S3C doesn't support service account. There is no cross account access for replication account.
130+
// (canonicalId looking like http://acs.zenko.io/accounts/service/replication)
131+
const itSkipS3C = process.env.S3_END_TO_END ? it.skip : it;
132+
itSkipS3C('should put configuration on a bucket with versioning if ' +
130133
'user is a replication user', done =>
131134
checkVersioningError(replicationAccountS3, 'Enabled', null, done));
132135
});

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,10 @@ describe('aws-node-sdk test bucket versioning', function testSuite() {
145145
s3.putBucketVersioning(params, done);
146146
});
147147

148-
it('should accept valid versioning configuration if user is a ' +
148+
// S3C doesn't support service account. There is no cross account access for replication account.
149+
// (canonicalId looking like http://acs.zenko.io/accounts/service/replication)
150+
const itSkipS3C = process.env.S3_END_TO_END ? it.skip : it;
151+
itSkipS3C('should accept valid versioning configuration if user is a ' +
149152
'replication user', done => {
150153
const params = {
151154
Bucket: bucket,

tests/functional/aws-node-sdk/test/object/copyPart.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,9 @@ describe('Object Part Copy', () => {
711711
});
712712
});
713713

714-
it('should not copy a part of a cold object', done => {
714+
// S3C doesn't support cold storage and restore
715+
const itSkipS3C = process.env.S3_END_TO_END ? it.skip : it;
716+
itSkipS3C('should not copy a part of a cold object', done => {
715717
const archive = {
716718
archiveInfo: {
717719
archiveId: '97a71dfe-49c1-4cca-840a-69199e0b0322',
@@ -734,7 +736,7 @@ describe('Object Part Copy', () => {
734736
});
735737
});
736738

737-
it('should copy a part of an object when it\'s transitioning to cold', done => {
739+
itSkipS3C('should copy a part of an object when it\'s transitioning to cold', done => {
738740
fakeMetadataTransition(sourceBucketName, sourceObjName, undefined, err => {
739741
assert.ifError(err);
740742
s3.uploadPartCopy({
@@ -752,7 +754,7 @@ describe('Object Part Copy', () => {
752754
});
753755
});
754756

755-
it('should copy a part of a restored object', done => {
757+
itSkipS3C('should copy a part of a restored object', done => {
756758
const archiveCompleted = {
757759
archiveInfo: {},
758760
restoreRequestedAt: new Date(0),

tests/functional/aws-node-sdk/test/object/mpuVersion.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function checkObjMdAndUpdate(objMDBefore, objMDAfter, props) {
102102

103103
// TODO: CLDSRV-721 RING 10 Support ObjectRestore (cold storage) with MD v1
104104
// The whole test suite is skipped as bad versionId breaks after each bucket cleanup
105-
const describeSkipNullMdV1 = isNullKeyMetadataV1 ? describe.skip : describe;
105+
const describeSkipNullMdV1 = isNullKeyMetadataV1 || process.env.S3_END_TO_END ? describe.skip : describe;
106106

107107
describeSkipNullMdV1('MPU with x-scal-s3-version-id header', () => {
108108
withV4(sigCfg => {

tests/functional/aws-node-sdk/test/object/objectHead_replication.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,13 @@ describe("Head object 'ReplicationStatus' value", () => {
4545
done => checkHeadObj(`${keyPrefix}-foobar`, undefined, done));
4646

4747
describe('With bucket replication config', () => {
48+
const role = process.env.S3_END_TO_END
49+
? 'arn:aws:iam::123456789012:role/src-resource,arn:aws:iam::123456789012:role/dest-resource'
50+
: 'arn:aws:iam::123456789012:role/src-resource';
4851
beforeEach(done => s3.putBucketReplication({
4952
Bucket: sourceBucket,
5053
ReplicationConfiguration: {
51-
Role: 'arn:aws:iam::123456789012:role/src-resource',
54+
Role: role,
5255
Rules: [
5356
{
5457
Destination: { StorageClass: 'us-east-2',

tests/functional/aws-node-sdk/test/object/putVersion.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function checkObjMdAndUpdate(objMDBefore, objMDAfter, props) {
5353

5454
// TODO: CLDSRV-721 RING 10 Support ObjectRestore (cold storage) with MD v1
5555
// The whole test suite is skipped as bad versionId breaks after each bucket cleanup
56-
const describeSkipNullMdV1 = isNullKeyMetadataV1 ? describe.skip : describe;
56+
const describeSkipNullMdV1 = isNullKeyMetadataV1 || process.env.S3_END_TO_END ? describe.skip : describe;
5757

5858
describeSkipNullMdV1('PUT object with x-scal-s3-version-id header', () => {
5959
withV4(sigCfg => {

0 commit comments

Comments
 (0)