(hasStorageClass)
| 118 | |
| 119 | // Create the bucket in metadata with versioning and a replication config. |
| 120 | function createBucketWithReplication(hasStorageClass) { |
| 121 | createBucket(); |
| 122 | const config = { |
| 123 | role: 'arn:aws:iam::account-id:role/src-resource,' + |
| 124 | 'arn:aws:iam::account-id:role/dest-resource', |
| 125 | destination: 'arn:aws:s3:::source-bucket', |
| 126 | rules: [{ |
| 127 | prefix: keyA, |
| 128 | enabled: true, |
| 129 | id: 'test-id', |
| 130 | }], |
| 131 | }; |
| 132 | if (hasStorageClass) { |
| 133 | config.rules[0].storageClass = storageClassType; |
| 134 | } |
| 135 | Object.assign(metadata.buckets.get(bucketName), { |
| 136 | _versioningConfiguration: { status: 'Enabled' }, |
| 137 | _replicationConfiguration: config, |
| 138 | }); |
| 139 | } |
| 140 | |
| 141 | // Create the shadow bucket in metadata for MPUs with a recent model number. |
| 142 | function createShadowBucket(key, uploadId) { |
no test coverage detected