Skip to content

Commit

Permalink
chore(eks): remove duplicate test case (#29814)
Browse files Browse the repository at this point in the history
### Reason for this change

The removed case `'throws when a core construct is added as cdk8s chart'` is the same as `'throws when a non cdk8s chart construct is added as cdk8s chart'`.

### Description of changes

Removed duplicates.

### Description of how you validated changes

Just removed the case.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
matt9ucci authored Apr 12, 2024
1 parent a7384c2 commit 97e9ea0
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions packages/aws-cdk-lib/aws-eks/test/cluster.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,20 +350,6 @@ describe('cluster', () => {
expect(() => cluster.addCdk8sChart('chart', someConstruct)).toThrow(/Invalid cdk8s chart. Must contain a \'toJson\' method, but found undefined/);
});

test('throws when a core construct is added as cdk8s chart', () => {
const { stack } = testFixture();

const cluster = new eks.Cluster(stack, 'Cluster', {
version: CLUSTER_VERSION,
prune: false,
});

// create a plain construct, not a cdk8s chart
const someConstruct = new Construct(stack, 'SomeConstruct');

expect(() => cluster.addCdk8sChart('chart', someConstruct)).toThrow(/Invalid cdk8s chart. Must contain a \'toJson\' method, but found undefined/);
});

test('cdk8s chart can be added to cluster', () => {
const { stack } = testFixture();

Expand Down

0 comments on commit 97e9ea0

Please sign in to comment.