Skip to content

Commit f17ac7a

Browse files
authored
chore: upgrade cdk-from-cfn to latest version (#998)
We used to test that we support go. That test has been silenced, because upstream cdk-from-cfn doesn't pretend to support go anymore (it never produced good code apparently). --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license
1 parent db19110 commit f17ac7a

File tree

5 files changed

+21
-13
lines changed

5 files changed

+21
-13
lines changed

packages/@aws-cdk/toolkit-lib/package.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/aws-cdk/THIRD_PARTY_LICENSES

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21404,7 +21404,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
2140421404

2140521405
----------------
2140621406

21407-
** cdk-from-cfn@0.248.0 - https://www.npmjs.com/package/cdk-from-cfn/v/0.248.0 | MIT OR Apache-2.0
21407+
** cdk-from-cfn@0.261.0 - https://www.npmjs.com/package/cdk-from-cfn/v/0.261.0 | MIT OR Apache-2.0
2140821408

2140921409
----------------
2141021410

packages/aws-cdk/package.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/aws-cdk/test/commands/migrate.test.ts

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable jest/no-disabled-tests */
12
import { exec as _exec } from 'child_process';
23
import * as os from 'os';
34
import * as path from 'path';
@@ -38,6 +39,15 @@ const exec = promisify(_exec);
3839

3940
const ioHelper = new TestIoHost().asHelper('migrate');
4041

42+
function cliTest(name: string, handler: (dir: string) => void | Promise<any>): void {
43+
test(name, () => withTempDir(handler));
44+
}
45+
function cliTestSkip(name: string, _handler: (dir: string) => void | Promise<any>): void {
46+
test.skip(name, () => {
47+
});
48+
}
49+
cliTest.skip = cliTestSkip;
50+
4151
describe('Migrate Function Tests', () => {
4252
let sdkProvider: MockSdkProvider;
4353

@@ -189,7 +199,8 @@ describe('Migrate Function Tests', () => {
189199
});
190200

191201
// TODO: fix with actual go template
192-
test('generateStack generates the expected stack string when called for go', () => {
202+
// Go is currently disabled in cdk-from-cfn
203+
test.skip('generateStack generates the expected stack string when called for go', () => {
193204
const stack = generateStack(validTemplate, 'GoodGo', 'go');
194205
expect(stack).toEqual(fs.readFileSync(path.join(...stackPath, 's3.go'), 'utf8'));
195206
});
@@ -334,7 +345,8 @@ describe('Migrate Function Tests', () => {
334345
expect(replacedStack).toEqual(fs.readFileSync(path.join(...stackPath, 'S3Stack.cs'), 'utf8'));
335346
});
336347

337-
cliTest('generatedCdkApp generates the expected cdk app when called for go', async (workDir) => {
348+
// Golang is currently not supported by cdk-from-cfn
349+
cliTest.skip('generatedCdkApp generates the expected cdk app when called for go', async (workDir) => {
338350
const stack = generateStack(validTemplate, 'GoodGo', 'go');
339351
await generateCdkApp(ioHelper, 'GoodGo', stack, 'go', workDir);
340352

@@ -374,10 +386,6 @@ describe('Migrate Function Tests', () => {
374386
});
375387
});
376388

377-
function cliTest(name: string, handler: (dir: string) => void | Promise<any>): void {
378-
test(name, () => withTempDir(handler));
379-
}
380-
381389
async function withTempDir(cb: (dir: string) => void | Promise<any>) {
382390
const tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), 'aws-cdk-test'));
383391
try {

yarn.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)