Skip to content

Commit ee963ef

Browse files
wip Integration tests
1 parent 4ca568b commit ee963ef

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

lib/kms/wrapper.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,11 @@ function getClientForKey(key, log) {
155155
}
156156

157157
class KMS {
158+
/** Access to client for tests (Integration needs to turn off _supportsDefaultKeyPerAccount) */
159+
static get client() {
160+
return client;
161+
}
162+
158163
/** Used for keys from current client */
159164
static get arnPrefix() {
160165
return client.backend.arnPrefix;

tests/functional/sse-kms-migration/arnPrefix.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ const s3config = getConfig('default', { signatureVersion: 'v4' });
6262
const s3 = new S3(s3config);
6363
const bucketUtil = new BucketUtility();
6464

65+
kms.client._supportsDefaultKeyPerAccount = false; // To generate keys without vault account side effect
66+
6567
function hydrateSSEConfig({ algo: SSEAlgorithm, masterKeyId: KMSMasterKeyID }) {
6668
// stringify and parse to strip undefined values
6769
return JSON.parse(JSON.stringify({ Rules: [{

tests/functional/sse-kms-migration/migration.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ const s3config = getConfig('default', { signatureVersion: 'v4' });
6060
const s3 = new S3(s3config);
6161
const bucketUtil = new BucketUtility();
6262

63+
kms.client._supportsDefaultKeyPerAccount = false; // To generate keys without vault account side effect
64+
6365
// Fix for before migration run
6466
// if (!kms.arnPrefix) kms.arnPrefix = '';
6567

0 commit comments

Comments
 (0)