Skip to content

Commit

Permalink
update other related test
Browse files Browse the repository at this point in the history
  • Loading branch information
xazhao committed Jan 15, 2025
1 parent 8953cf9 commit 2d34f19
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { KubectlV31Layer } from '@aws-cdk/lambda-layer-kubectl-v31';
import { capitalizePropertyNames } from './utils';
import { Template } from '../../assertions';
import * as ec2 from '../../aws-ec2';
Expand Down Expand Up @@ -79,6 +80,7 @@ describe.each([ManagedEc2EcsComputeEnvironment, ManagedEc2EksComputeEnvironment]
kubernetesNamespace: 'cdk-test-namespace',
eksCluster: new eks.Cluster(stack, 'eksTestCluster', {
version: eks.KubernetesVersion.V1_24,
kubectlLayer: new KubectlV31Layer(stack, 'KubectlLayer'),
}),
};
expectedProps = ComputeEnvironment === ManagedEc2EcsComputeEnvironment
Expand Down Expand Up @@ -740,6 +742,7 @@ describe('ManagedEc2EcsComputeEnvironment', () => {
kubernetesNamespace: 'cdk-test-namespace',
eksCluster: new eks.Cluster(stack, 'eksTestCluster', {
version: eks.KubernetesVersion.V1_24,
kubectlLayer: new KubectlV31Layer(stack, 'KubectlLayer'),
}),
};
});
Expand Down Expand Up @@ -909,6 +912,7 @@ describe('ManagedEc2EksComputeEnvironment', () => {
kubernetesNamespace: 'cdk-test-namespace',
eksCluster: new eks.Cluster(stack, 'eksTestCluster', {
version: eks.KubernetesVersion.V1_24,
kubectlLayer: new KubectlV31Layer(stack, 'KubectlLayer'),
}),
};
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { KubectlV31Layer } from '@aws-cdk/lambda-layer-kubectl-v31';
import * as eks from '../../../aws-eks';
import * as sfn from '../../../aws-stepfunctions';
import { Stack } from '../../../core';
Expand All @@ -12,6 +13,7 @@ beforeEach(() => {
cluster = new eks.Cluster(stack, 'Cluster', {
version: eks.KubernetesVersion.V1_21,
clusterName: 'eksCluster',
kubectlLayer: new KubectlV31Layer(stack, 'KubectlLayer'),
});
});

Expand Down Expand Up @@ -199,6 +201,7 @@ test('Task throws if cluster supplied does not have clusterEndpoint configured',
const importedCluster = eks.Cluster.fromClusterAttributes(stack, 'InvalidCluster', {
clusterName: 'importedCluster',
clusterCertificateAuthorityData: 'clusterCertificateAuthorityData',
kubectlLayer: new KubectlV31Layer(stack, 'KubectlLayer'),
});
expect(() => {
new EksCall(stack, 'Call', {
Expand All @@ -218,6 +221,7 @@ test('Task throws if cluster supplied does not have clusterCertificateAuthorityD
const importedCluster = eks.Cluster.fromClusterAttributes(stack, 'InvalidCluster', {
clusterName: 'importedCluster',
clusterEndpoint: 'clusterEndpoint',
kubectlLayer: new KubectlV31Layer(stack, 'KubectlLayer'),
});
expect(() => {
new EksCall(stack, 'Call', {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { KubectlV31Layer } from '@aws-cdk/lambda-layer-kubectl-v31';
import { Template } from '../../../assertions';
import * as eks from '../../../aws-eks';
import * as sfn from '../../../aws-stepfunctions';
Expand Down Expand Up @@ -104,6 +105,7 @@ describe('Invoke emr-containers CreateVirtualCluster with ', () => {
// WHEN
const eksCluster = new eks.Cluster(stack, 'EKS Cluster', {
version: eks.KubernetesVersion.V1_20,
kubectlLayer: new KubectlV31Layer(stack, 'KubectlLayer'),
});

const task = new EmrContainersCreateVirtualCluster(stack, 'Task', {
Expand Down

0 comments on commit 2d34f19

Please sign in to comment.