|
| 1 | +/* eslint-disable jest/no-disabled-tests */ |
1 | 2 | import { exec as _exec } from 'child_process'; |
2 | 3 | import * as os from 'os'; |
3 | 4 | import * as path from 'path'; |
@@ -38,6 +39,15 @@ const exec = promisify(_exec); |
38 | 39 |
|
39 | 40 | const ioHelper = new TestIoHost().asHelper('migrate'); |
40 | 41 |
|
| 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 | + |
41 | 51 | describe('Migrate Function Tests', () => { |
42 | 52 | let sdkProvider: MockSdkProvider; |
43 | 53 |
|
@@ -189,7 +199,8 @@ describe('Migrate Function Tests', () => { |
189 | 199 | }); |
190 | 200 |
|
191 | 201 | // 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', () => { |
193 | 204 | const stack = generateStack(validTemplate, 'GoodGo', 'go'); |
194 | 205 | expect(stack).toEqual(fs.readFileSync(path.join(...stackPath, 's3.go'), 'utf8')); |
195 | 206 | }); |
@@ -334,7 +345,8 @@ describe('Migrate Function Tests', () => { |
334 | 345 | expect(replacedStack).toEqual(fs.readFileSync(path.join(...stackPath, 'S3Stack.cs'), 'utf8')); |
335 | 346 | }); |
336 | 347 |
|
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) => { |
338 | 350 | const stack = generateStack(validTemplate, 'GoodGo', 'go'); |
339 | 351 | await generateCdkApp(ioHelper, 'GoodGo', stack, 'go', workDir); |
340 | 352 |
|
@@ -374,10 +386,6 @@ describe('Migrate Function Tests', () => { |
374 | 386 | }); |
375 | 387 | }); |
376 | 388 |
|
377 | | -function cliTest(name: string, handler: (dir: string) => void | Promise<any>): void { |
378 | | - test(name, () => withTempDir(handler)); |
379 | | -} |
380 | | - |
381 | 389 | async function withTempDir(cb: (dir: string) => void | Promise<any>) { |
382 | 390 | const tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), 'aws-cdk-test')); |
383 | 391 | try { |
|
0 commit comments