Skip to content

Commit 9251610

Browse files
authored
chore: fix go init template test to unblock v2 pipeline (#24472)
The v2 pipeline is currently blocked due to the new go integ test failing. This change adds the correct go replacement and fixes a failing test in the sample app. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent a4856e9 commit 9251610

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/@aws-cdk-testing/cli-integ/tests/init-go/init-go.integtest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { integTest, withTemporaryDirectory, ShellHelper, withPackages } from '..
88
await context.packages.makeCliAvailable();
99

1010
await shell.shell(['cdk', 'init', '-l', 'go', template]);
11-
await shell.shell(['go', 'mod', 'edit', '-replace', 'github.com/aws/aws-cdk-go/awscdk=$dist_root/go/awscdk']);
11+
await shell.shell(['go', 'mod', 'edit', '-replace', 'github.com/aws/aws-cdk-go/awscdk/v2=$CODEBUILD_SRC_DIR/go/awscdk']);
1212
await shell.shell(['go', 'mod', 'tidy']);
1313
await shell.shell(['go', 'test']);
1414
await shell.shell(['cdk', 'synth']);

packages/aws-cdk/lib/init-templates/sample-app/go/%name%_test.template.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func Test%name.PascalCased%Stack(t *testing.T) {
1616
stack := New%name.PascalCased%Stack(app, "MyStack", nil)
1717

1818
// THEN
19-
template := assertions.Template_FromStack(stack)
19+
template := assertions.Template_FromStack(stack, nil)
2020

2121
template.HasResourceProperties(jsii.String("AWS::SQS::Queue"), map[string]interface{}{
2222
"VisibilityTimeout": 300,

0 commit comments

Comments
 (0)