Skip to content

Commit

Permalink
add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
badmintoncryer committed Jul 10, 2024
1 parent 50a1b76 commit f3c934f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions packages/aws-cdk-lib/aws-eks/test/addon.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,26 @@ describe('Addon', () => {
},
});
});
test('create a new Addon with preserveOnDelete', () => {
// GIVEN

// WHEN
new Addon(stack, 'TestAddonWithPreserveOnDelete', {
addonName: 'test-addon',
cluster,
preserveOnDelete: false,
});

// THEN
const t = Template.fromStack(stack);
t.hasResourceProperties('AWS::EKS::Addon', {
AddonName: 'test-addon',
ClusterName: {
Ref: 'Cluster9EE0221C',
},
PreserveOnDelete: false,
});
});

test('creates an Addon from attributes', () => {
// GIVEN
Expand Down

0 comments on commit f3c934f

Please sign in to comment.