Skip to content

Commit ee36150

Browse files
chore(cli-integ): add go init tests in preparation to adding them to our pipeline (#24229)
Based off https://github.com/aws/aws-cdk/blob/ca208058256703759ae5e35d04194edbdc6b1756/packages/aws-cdk/test/integ/init/test-go.sh. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 78ee005 commit ee36150

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { integTest, withTemporaryDirectory, ShellHelper, withPackages } from '../../lib';
2+
3+
['app', 'sample-app'].forEach(template => {
4+
integTest(`init go ${template}`, withTemporaryDirectory(withPackages(async (context) => {
5+
context.packages.assertJsiiPackagesAvailable();
6+
7+
const shell = ShellHelper.fromContext(context);
8+
await context.packages.makeCliAvailable();
9+
10+
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']);
12+
await shell.shell(['go', 'mod', 'tidy']);
13+
await shell.shell(['go', 'test']);
14+
await shell.shell(['cdk', 'synth']);
15+
})));
16+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
set -eu
3+
# This is a backwards compatibility script. All logic has moved to '@aws-cdk-testing/cli-integ'
4+
# and should be called from there directly.
5+
6+
exec ${INTEG_TOOLS}/bin/run-suite --use-cli-release=$VERSION init-go

0 commit comments

Comments
 (0)