|
1 | 1 | package main |
2 | 2 |
|
3 | 3 | import ( |
4 | | - "testing" |
| 4 | + "testing" |
5 | 5 |
|
6 | | - "github.com/aws/aws-cdk-go/awscdk/v2" |
7 | | - "github.com/aws/aws-cdk-go/awscdk/v2/assertions" |
8 | | - "github.com/aws/jsii-runtime-go" |
| 6 | + "github.com/aws/aws-cdk-go/awscdk/v2" |
| 7 | + "github.com/aws/aws-cdk-go/awscdk/v2/assertions" |
| 8 | + "github.com/aws/jsii-runtime-go" |
9 | 9 | ) |
10 | 10 |
|
11 | 11 | func TestAppServerlessCdkGoStack(t *testing.T) { |
12 | | - // GIVEN |
13 | | - app := awscdk.NewApp(nil) |
| 12 | + // GIVEN |
| 13 | + app := awscdk.NewApp(nil) |
14 | 14 |
|
15 | | - // WHEN |
16 | | - stack := NewAppServerlessCdkGoStack(app, "MyStack", nil) |
| 15 | + // WHEN |
| 16 | + stack := NewAppServerlessCdkGoStack(app, "MyStack", nil) |
17 | 17 |
|
18 | | - // THEN |
19 | | - template := assertions.Template_FromStack(stack, nil) |
| 18 | + // THEN |
| 19 | + template := assertions.Template_FromStack(stack, nil) |
20 | 20 |
|
21 | | - template.HasResourceProperties(jsii.String("AWS::Lambda::Function"), map[string]interface{}{ |
22 | | - "Runtime": "provided.al2", |
23 | | - }) |
| 21 | + template.HasResourceProperties(jsii.String("AWS::Lambda::Function"), map[string]interface{}{ |
| 22 | + "Runtime": "provided.al2", |
| 23 | + }) |
24 | 24 |
|
25 | | - template.HasResourceProperties(jsii.String("AWS::ApiGateway::RestApi"), map[string]interface{}{ |
26 | | - "Name": "myGoApi", |
27 | | - }) |
| 25 | + template.HasResourceProperties(jsii.String("AWS::ApiGateway::RestApi"), map[string]interface{}{ |
| 26 | + "Name": "myGoApi", |
| 27 | + }) |
28 | 28 |
|
29 | | - template.HasResourceProperties(jsii.String("AWS::ApiGateway::Resource"), map[string]interface{}{ |
30 | | - "PathPart": "hello-world", |
31 | | - }) |
| 29 | + template.HasResourceProperties(jsii.String("AWS::ApiGateway::Resource"), map[string]interface{}{ |
| 30 | + "PathPart": "hello-world", |
| 31 | + }) |
32 | 32 | } |
0 commit comments