MCPcopy Create free account
hub / github.com/aws-samples/aws-cdk-examples / TestEc2InstanceStack

Function TestEc2InstanceStack

go/ec2-instance/ec2-instance_test.go:11–25  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

9)
10
11func TestEc2InstanceStack(t *testing.T) {
12 // GIVEN
13 app := awscdk.NewApp(nil)
14
15 // WHEN
16 stack := NewEc2InstanceStack(app, "MyStack", nil)
17
18 // THEN
19 template := assertions.Template_FromStack(stack, nil)
20
21 template.HasResourceProperties(jsii.String("AWS::SQS::Queue"), map[string]interface{}{
22 "VisibilityTimeout": 300,
23 })
24 template.ResourceCountIs(jsii.String("AWS::SNS::Topic"), jsii.Number(1))
25}

Callers

nothing calls this directly

Calls 1

NewEc2InstanceStackFunction · 0.85

Tested by

no test coverage detected