Skip to content

Commit ffdb39f

Browse files
committed
remove region check tests
1 parent 49cc745 commit ffdb39f

2 files changed

Lines changed: 0 additions & 35 deletions

File tree

packages/constructs/replicated-key/tests/construct.test.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -91,19 +91,6 @@ describe('replicated-key', () => {
9191
})
9292
}).toThrowError('stack region is unresolved, please explicitly specify')
9393
})
94-
test('stack region is invalid error', () => {
95-
const app = new cdk.App()
96-
const stack = new cdk.Stack(app, 'stack', {
97-
env: {
98-
region: 'invalid',
99-
},
100-
})
101-
expect(() => {
102-
new ReplicatedKey(stack, 'key', {
103-
replicaRegions: ['af-south-1', 'cn-north-1'],
104-
})
105-
}).toThrowError('stack region is invalid')
106-
})
10794
test('grantEncryptDecrypt', () => {
10895
const { replicatedKey, template, stack } = synth()
10996
const lambda = new cdk.aws_lambda.Function(stack, 'lambda', {

packages/constructs/replicated-secret/tests/construct.test.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -131,28 +131,6 @@ describe('replicated-secret', () => {
131131
})
132132
}).toThrowError('stack region is not resolved, please be explicit')
133133
})
134-
test('invalid stack region error', () => {
135-
const app = new cdk.App()
136-
const keyStack = new cdk.Stack(app, 'stack', {
137-
env: {
138-
region: 'eu-west-2',
139-
},
140-
})
141-
const replicatedKey = new ReplicatedKey(keyStack, 'key', {
142-
replicaRegions: ['af-south-1', 'cn-north-1'],
143-
})
144-
const stack = new cdk.Stack(app, 'stack-2', {
145-
env: {
146-
region: 'invalid',
147-
},
148-
})
149-
expect(() => {
150-
new ReplicatedSecret(stack, 'secret', {
151-
replicaRegions: ['af-south-1', 'cn-north-1'],
152-
replicatedKey,
153-
})
154-
}).toThrowError('invalid stack region')
155-
})
156134
test('replicate secret into non-key region error', () => {
157135
const app = new cdk.App()
158136
const stack = new cdk.Stack(app, 'stack', {

0 commit comments

Comments
 (0)