This repository was archived by the owner on Jul 16, 2024. It is now read-only.
generated from amazon-archives/__template_MIT-0
-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathemr-eks-notebook-platform.test.ts
More file actions
53 lines (41 loc) · 1.49 KB
/
emr-eks-notebook-platform.test.ts
File metadata and controls
53 lines (41 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: MIT-0
/**
* Tests EmrEksCluster
*
* @group integ/emr-eks/notebook-platform
*/
import * as cdk from 'aws-cdk-lib';
import { deployStack, destroyStack } from './utils';
import { Autoscaler, EmrEksCluster } from '../../src/emr-eks-platform';
import { NotebookPlatform, StudioAuthMode } from '../../src/notebook-platform';
jest.setTimeout(2000000);
// GIVEN
const integTestApp = new cdk.App();
const stack = new cdk.Stack(integTestApp, 'EmrEksClustereE2eTest');
const emrEksCluster = EmrEksCluster.getOrCreate(stack, {
eksAdminRoleArn: 'arn:aws:iam::123445678912:role/my-role',
autoscaling: Autoscaler.CLUSTER_AUTOSCALER,
});
new NotebookPlatform(stack, 'dataplatformIAMAuth', {
emrEks: emrEksCluster,
studioName: 'e2estudio',
studioAuthMode: StudioAuthMode.IAM,
eksNamespace: 'dataplatformiamauth',
});
new cdk.CfnOutput(stack, 'EmrEksAdminRoleOutput', {
value: emrEksCluster.eksCluster.adminRole.roleArn,
exportName: 'emrEksAdminRole',
});
describe('deploy succeed', () => {
it('can be deploy succcessfully', async () => {
// GIVEN
const deployResult = await deployStack(integTestApp, stack);
// THEN
expect(deployResult.outputs.emrEksAdminRole).toEqual('arn:aws:iam::123445678912:role/my-role');
expect(deployResult.outputs.e2estudio).toMatch(/^https:\/\/.*/);
}, 9000000);
});
afterAll(async () => {
await destroyStack(integTestApp, stack);
}, 9000000);