Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit aa48646

Browse files
committedJul 9, 2024
unit tests
1 parent 483c862 commit aa48646

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
 

‎packages/@aws-cdk/custom-resource-handlers/test/aws-eks/cluster-resource-provider.test.ts

+22
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,28 @@ describe('cluster resource provider', () => {
368368
roleArn: 'new-arn',
369369
});
370370
});
371+
372+
test('updates to bootstrapSelfManagedAddons requires a replacement', async () => {
373+
const handler = new ClusterResourceHandler(mocks.client, mocks.newRequest('Update', {
374+
...mocks.MOCK_PROPS,
375+
bootstrapSelfManagedAddons: false,
376+
}, {
377+
...mocks.MOCK_PROPS,
378+
bootstrapSelfManagedAddons: true,
379+
}));
380+
const resp = await handler.onEvent();
381+
382+
expect(mocks.actualRequest.createClusterRequest!).toEqual({
383+
bootstrapSelfManagedAddons: false,
384+
name: 'MyResourceId-fakerequestid',
385+
roleArn: 'arn:of:role',
386+
resourcesVpcConfig:
387+
{
388+
subnetIds: ['subnet1', 'subnet2'],
389+
securityGroupIds: ['sg1', 'sg2', 'sg3'],
390+
},
391+
});
392+
});
371393
});
372394

373395
test('encryption config cannot be updated', async () => {

0 commit comments

Comments
 (0)