Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
avior authored and AviorSchreiber committed Feb 14, 2023
1 parent 29e5aac commit 75f3f35
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions packages/@aws-cdk/aws-eks/test/cluster-resource-provider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,25 @@ describe('cluster resource provider', () => {
});
});

test('change subnets or security groups order should not trigger an update', async () => {
const handler = new ClusterResourceHandler(mocks.client, mocks.newRequest('Update', {
...mocks.MOCK_PROPS,
resourcesVpcConfig: {
subnetIds: ['subnet1', 'subnet2'],
securityGroupIds: ['sg1', 'sg2'],
},
}, {
...mocks.MOCK_PROPS,
resourcesVpcConfig: {
subnetIds: ['subnet2', 'subnet1'],
securityGroupIds: ['sg2', 'sg1'],
},
}));
const resp = await handler.onEvent();

expect(resp).toEqual(undefined);
});

test('"roleArn" requires a replacement', async () => {
const handler = new ClusterResourceHandler(mocks.client, mocks.newRequest('Update', {
roleArn: 'new-arn',
Expand Down

0 comments on commit 75f3f35

Please sign in to comment.