Skip to content

Commit de097ee

Browse files
chore(ivs): update integ tests to use IntegTest construct (#24152)
> REPLACE THIS TEXT BLOCK > > Describe the reason for this change, what the solution is, and any > important design decisions you made. > > Remember to follow the [CONTRIBUTING GUIDE] and [DESIGN GUIDELINES] for any > code you submit. > > [CONTRIBUTING GUIDE]: https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md > [DESIGN GUIDELINES]: https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md Closes #<issue number here>. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 61c99cf commit de097ee

10 files changed

+216
-40
lines changed

packages/@aws-cdk/aws-ivs/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
"@aws-cdk/assertions": "0.0.0",
9696
"@aws-cdk/cdk-build-tools": "0.0.0",
9797
"@aws-cdk/integ-runner": "0.0.0",
98+
"@aws-cdk/integ-tests": "0.0.0",
9899
"@aws-cdk/cfn2ts": "0.0.0",
99100
"@aws-cdk/pkglint": "0.0.0",
100101
"@types/jest": "^27.5.2"

packages/@aws-cdk/aws-ivs/test/integ.ivs.js.snapshot/aws-cdk-ivs.assets.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
2-
"version": "20.0.0",
2+
"version": "30.0.0",
33
"files": {
4-
"b36ed5e0442d45ac76fe1b3f5b5145badac1a90491b827d69d0abf253f7b5a39": {
4+
"71d02f468f201d8c79d33a72cd8debac3b538f4e0efb492c6c06aca0055029f8": {
55
"source": {
66
"path": "aws-cdk-ivs.template.json",
77
"packaging": "file"
88
},
99
"destinations": {
1010
"current_account-current_region": {
1111
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
12-
"objectKey": "b36ed5e0442d45ac76fe1b3f5b5145badac1a90491b827d69d0abf253f7b5a39.json",
12+
"objectKey": "71d02f468f201d8c79d33a72cd8debac3b538f4e0efb492c6c06aca0055029f8.json",
1313
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
1414
}
1515
}

packages/@aws-cdk/aws-ivs/test/integ.ivs.js.snapshot/aws-cdk-ivs.template.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"PlaybackKeyPairBE17315B": {
44
"Type": "AWS::IVS::PlaybackKeyPair",
55
"Properties": {
6-
"PublicKeyMaterial": "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEs6k8Xf6WyFq3yZXoup8G/gH6DntSATqD\nYfo83eX0GJCKxJ8fr09h9LP9HDGof8/bo66P+SGHeAARGF/O9WPAQVUgSlm/KMFX\nEPtPtOm1s0GR9k1ydU5hkI++f9CoZ5lM\n-----END PUBLIC KEY-----",
7-
"Name": "IVSIntegrationTestPlaybackKeyPair"
6+
"Name": "IVSIntegrationTestPlaybackKeyPair",
7+
"PublicKeyMaterial": "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEs6k8Xf6WyFq3yZXoup8G/gH6DntSATqD\nYfo83eX0GJCKxJ8fr09h9LP9HDGof8/bo66P+SGHeAARGF/O9WPAQVUgSlm/KMFX\nEPtPtOm1s0GR9k1ydU5hkI++f9CoZ5lM\n-----END PUBLIC KEY-----"
88
}
99
},
1010
"Channel4048F119": {
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"version":"20.0.0"}
1+
{"version":"30.0.0"}
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
{
2-
"version": "20.0.0",
2+
"version": "30.0.0",
33
"testCases": {
4-
"integ.ivs": {
4+
"ivs-test/DefaultTest": {
55
"stacks": [
66
"aws-cdk-ivs"
77
],
8-
"diffAssets": false,
9-
"stackUpdateWorkflow": true
8+
"assertionStack": "ivs-test/DefaultTest/DeployAssert",
9+
"assertionStackName": "ivstestDefaultTestDeployAssertDCE80D47"
1010
}
11-
},
12-
"synthContext": {},
13-
"enableLookups": false
11+
}
1412
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"version": "30.0.0",
3+
"files": {
4+
"21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
5+
"source": {
6+
"path": "ivstestDefaultTestDeployAssertDCE80D47.template.json",
7+
"packaging": "file"
8+
},
9+
"destinations": {
10+
"current_account-current_region": {
11+
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
12+
"objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json",
13+
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
14+
}
15+
}
16+
}
17+
},
18+
"dockerImages": {}
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"Parameters": {
3+
"BootstrapVersion": {
4+
"Type": "AWS::SSM::Parameter::Value<String>",
5+
"Default": "/cdk-bootstrap/hnb659fds/version",
6+
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
7+
}
8+
},
9+
"Rules": {
10+
"CheckBootstrapVersion": {
11+
"Assertions": [
12+
{
13+
"Assert": {
14+
"Fn::Not": [
15+
{
16+
"Fn::Contains": [
17+
[
18+
"1",
19+
"2",
20+
"3",
21+
"4",
22+
"5"
23+
],
24+
{
25+
"Ref": "BootstrapVersion"
26+
}
27+
]
28+
}
29+
]
30+
},
31+
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
32+
}
33+
]
34+
}
35+
}
36+
}

packages/@aws-cdk/aws-ivs/test/integ.ivs.js.snapshot/manifest.json

+55-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
{
2-
"version": "20.0.0",
2+
"version": "30.0.0",
33
"artifacts": {
4-
"Tree": {
5-
"type": "cdk:tree",
6-
"properties": {
7-
"file": "tree.json"
8-
}
9-
},
104
"aws-cdk-ivs.assets": {
115
"type": "cdk:asset-manifest",
126
"properties": {
@@ -23,7 +17,7 @@
2317
"validateOnSynth": false,
2418
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
2519
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
26-
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/b36ed5e0442d45ac76fe1b3f5b5145badac1a90491b827d69d0abf253f7b5a39.json",
20+
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/71d02f468f201d8c79d33a72cd8debac3b538f4e0efb492c6c06aca0055029f8.json",
2721
"requiresBootstrapStackVersion": 6,
2822
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
2923
"additionalDependencies": [
@@ -89,6 +83,59 @@
8983
]
9084
},
9185
"displayName": "aws-cdk-ivs"
86+
},
87+
"ivstestDefaultTestDeployAssertDCE80D47.assets": {
88+
"type": "cdk:asset-manifest",
89+
"properties": {
90+
"file": "ivstestDefaultTestDeployAssertDCE80D47.assets.json",
91+
"requiresBootstrapStackVersion": 6,
92+
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
93+
}
94+
},
95+
"ivstestDefaultTestDeployAssertDCE80D47": {
96+
"type": "aws:cloudformation:stack",
97+
"environment": "aws://unknown-account/unknown-region",
98+
"properties": {
99+
"templateFile": "ivstestDefaultTestDeployAssertDCE80D47.template.json",
100+
"validateOnSynth": false,
101+
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
102+
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
103+
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json",
104+
"requiresBootstrapStackVersion": 6,
105+
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
106+
"additionalDependencies": [
107+
"ivstestDefaultTestDeployAssertDCE80D47.assets"
108+
],
109+
"lookupRole": {
110+
"arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}",
111+
"requiresBootstrapStackVersion": 8,
112+
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
113+
}
114+
},
115+
"dependencies": [
116+
"ivstestDefaultTestDeployAssertDCE80D47.assets"
117+
],
118+
"metadata": {
119+
"/ivs-test/DefaultTest/DeployAssert/BootstrapVersion": [
120+
{
121+
"type": "aws:cdk:logicalId",
122+
"data": "BootstrapVersion"
123+
}
124+
],
125+
"/ivs-test/DefaultTest/DeployAssert/CheckBootstrapVersion": [
126+
{
127+
"type": "aws:cdk:logicalId",
128+
"data": "CheckBootstrapVersion"
129+
}
130+
]
131+
},
132+
"displayName": "ivs-test/DefaultTest/DeployAssert"
133+
},
134+
"Tree": {
135+
"type": "cdk:tree",
136+
"properties": {
137+
"file": "tree.json"
138+
}
92139
}
93140
}
94141
}

packages/@aws-cdk/aws-ivs/test/integ.ivs.js.snapshot/tree.json

+89-19
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,6 @@
44
"id": "App",
55
"path": "",
66
"children": {
7-
"Tree": {
8-
"id": "Tree",
9-
"path": "Tree",
10-
"constructInfo": {
11-
"fqn": "constructs.Construct",
12-
"version": "10.1.85"
13-
}
14-
},
157
"aws-cdk-ivs": {
168
"id": "aws-cdk-ivs",
179
"path": "aws-cdk-ivs",
@@ -26,8 +18,8 @@
2618
"attributes": {
2719
"aws:cdk:cloudformation:type": "AWS::IVS::PlaybackKeyPair",
2820
"aws:cdk:cloudformation:props": {
29-
"publicKeyMaterial": "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEs6k8Xf6WyFq3yZXoup8G/gH6DntSATqD\nYfo83eX0GJCKxJ8fr09h9LP9HDGof8/bo66P+SGHeAARGF/O9WPAQVUgSlm/KMFX\nEPtPtOm1s0GR9k1ydU5hkI++f9CoZ5lM\n-----END PUBLIC KEY-----",
30-
"name": "IVSIntegrationTestPlaybackKeyPair"
21+
"name": "IVSIntegrationTestPlaybackKeyPair",
22+
"publicKeyMaterial": "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEs6k8Xf6WyFq3yZXoup8G/gH6DntSATqD\nYfo83eX0GJCKxJ8fr09h9LP9HDGof8/bo66P+SGHeAARGF/O9WPAQVUgSlm/KMFX\nEPtPtOm1s0GR9k1ydU5hkI++f9CoZ5lM\n-----END PUBLIC KEY-----"
3123
}
3224
},
3325
"constructInfo": {
@@ -101,36 +93,114 @@
10193
"id": "PlaybackKeyPairArn",
10294
"path": "aws-cdk-ivs/PlaybackKeyPairArn",
10395
"constructInfo": {
104-
"fqn": "constructs.Construct",
105-
"version": "10.1.85"
96+
"fqn": "@aws-cdk/core.CfnOutput",
97+
"version": "0.0.0"
10698
}
10799
},
108100
"ChannelArn": {
109101
"id": "ChannelArn",
110102
"path": "aws-cdk-ivs/ChannelArn",
111103
"constructInfo": {
112-
"fqn": "constructs.Construct",
113-
"version": "10.1.85"
104+
"fqn": "@aws-cdk/core.CfnOutput",
105+
"version": "0.0.0"
114106
}
115107
},
116108
"StreamKeyArn": {
117109
"id": "StreamKeyArn",
118110
"path": "aws-cdk-ivs/StreamKeyArn",
119111
"constructInfo": {
120-
"fqn": "constructs.Construct",
121-
"version": "10.1.85"
112+
"fqn": "@aws-cdk/core.CfnOutput",
113+
"version": "0.0.0"
114+
}
115+
},
116+
"BootstrapVersion": {
117+
"id": "BootstrapVersion",
118+
"path": "aws-cdk-ivs/BootstrapVersion",
119+
"constructInfo": {
120+
"fqn": "@aws-cdk/core.CfnParameter",
121+
"version": "0.0.0"
122+
}
123+
},
124+
"CheckBootstrapVersion": {
125+
"id": "CheckBootstrapVersion",
126+
"path": "aws-cdk-ivs/CheckBootstrapVersion",
127+
"constructInfo": {
128+
"fqn": "@aws-cdk/core.CfnRule",
129+
"version": "0.0.0"
122130
}
123131
}
124132
},
133+
"constructInfo": {
134+
"fqn": "@aws-cdk/core.Stack",
135+
"version": "0.0.0"
136+
}
137+
},
138+
"ivs-test": {
139+
"id": "ivs-test",
140+
"path": "ivs-test",
141+
"children": {
142+
"DefaultTest": {
143+
"id": "DefaultTest",
144+
"path": "ivs-test/DefaultTest",
145+
"children": {
146+
"Default": {
147+
"id": "Default",
148+
"path": "ivs-test/DefaultTest/Default",
149+
"constructInfo": {
150+
"fqn": "constructs.Construct",
151+
"version": "10.1.249"
152+
}
153+
},
154+
"DeployAssert": {
155+
"id": "DeployAssert",
156+
"path": "ivs-test/DefaultTest/DeployAssert",
157+
"children": {
158+
"BootstrapVersion": {
159+
"id": "BootstrapVersion",
160+
"path": "ivs-test/DefaultTest/DeployAssert/BootstrapVersion",
161+
"constructInfo": {
162+
"fqn": "@aws-cdk/core.CfnParameter",
163+
"version": "0.0.0"
164+
}
165+
},
166+
"CheckBootstrapVersion": {
167+
"id": "CheckBootstrapVersion",
168+
"path": "ivs-test/DefaultTest/DeployAssert/CheckBootstrapVersion",
169+
"constructInfo": {
170+
"fqn": "@aws-cdk/core.CfnRule",
171+
"version": "0.0.0"
172+
}
173+
}
174+
},
175+
"constructInfo": {
176+
"fqn": "@aws-cdk/core.Stack",
177+
"version": "0.0.0"
178+
}
179+
}
180+
},
181+
"constructInfo": {
182+
"fqn": "@aws-cdk/integ-tests.IntegTestCase",
183+
"version": "0.0.0"
184+
}
185+
}
186+
},
187+
"constructInfo": {
188+
"fqn": "@aws-cdk/integ-tests.IntegTest",
189+
"version": "0.0.0"
190+
}
191+
},
192+
"Tree": {
193+
"id": "Tree",
194+
"path": "Tree",
125195
"constructInfo": {
126196
"fqn": "constructs.Construct",
127-
"version": "10.1.85"
197+
"version": "10.1.249"
128198
}
129199
}
130200
},
131201
"constructInfo": {
132-
"fqn": "constructs.Construct",
133-
"version": "10.1.85"
202+
"fqn": "@aws-cdk/core.App",
203+
"version": "0.0.0"
134204
}
135205
}
136206
}

packages/@aws-cdk/aws-ivs/test/integ.ivs.ts

+5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { App, CfnOutput, Stack } from '@aws-cdk/core';
2+
import { IntegTest } from '@aws-cdk/integ-tests';
23
import * as ivs from '../lib';
34

45
/*
@@ -41,4 +42,8 @@ new CfnOutput(stack, 'PlaybackKeyPairArn', { value: keypair.playbackKeyPairArn }
4142
new CfnOutput(stack, 'ChannelArn', { value: channel.channelArn });
4243
new CfnOutput(stack, 'StreamKeyArn', { value: streamKey.streamKeyArn });
4344

45+
new IntegTest(app, 'ivs-test', {
46+
testCases: [stack],
47+
});
48+
4449
app.synth();

0 commit comments

Comments
 (0)