-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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*
- Loading branch information
1 parent
78ee005
commit ee36150
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
packages/@aws-cdk-testing/cli-integ/tests/init-go/init-go.integtest.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { integTest, withTemporaryDirectory, ShellHelper, withPackages } from '../../lib'; | ||
|
||
['app', 'sample-app'].forEach(template => { | ||
integTest(`init go ${template}`, withTemporaryDirectory(withPackages(async (context) => { | ||
context.packages.assertJsiiPackagesAvailable(); | ||
|
||
const shell = ShellHelper.fromContext(context); | ||
await context.packages.makeCliAvailable(); | ||
|
||
await shell.shell(['cdk', 'init', '-l', 'go', template]); | ||
await shell.shell(['go', 'mod', 'edit', '-replace', 'github.com/aws/aws-cdk-go/awscdk=$dist_root/go/awscdk']); | ||
await shell.shell(['go', 'mod', 'tidy']); | ||
await shell.shell(['go', 'test']); | ||
await shell.shell(['cdk', 'synth']); | ||
}))); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
set -eu | ||
# This is a backwards compatibility script. All logic has moved to '@aws-cdk-testing/cli-integ' | ||
# and should be called from there directly. | ||
|
||
exec ${INTEG_TOOLS}/bin/run-suite --use-cli-release=$VERSION init-go |