From 848663278b53f6536c69178cd60d2c81daaf6bd0 Mon Sep 17 00:00:00 2001 From: Attila Hajdrik Date: Fri, 8 Jan 2021 11:51:19 -0800 Subject: [PATCH] chore: update console integration test (#6346) --- .../__tests__/pullAndInit.test.ts | 3 +++ .../src/pullAndInit/amplifyArtifactsManager.ts | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/packages/amplify-console-integration-tests/__tests__/pullAndInit.test.ts b/packages/amplify-console-integration-tests/__tests__/pullAndInit.test.ts index f433146a220..4766ccd639b 100644 --- a/packages/amplify-console-integration-tests/__tests__/pullAndInit.test.ts +++ b/packages/amplify-console-integration-tests/__tests__/pullAndInit.test.ts @@ -29,6 +29,7 @@ import { checkAmplifyFolderStructure, getTeamProviderInfo, getProjectConfig, + removeDotConfigDir, } from '../src/pullAndInit/amplifyArtifactsManager'; import * as util from '../src/util'; @@ -95,6 +96,7 @@ describe('amplify console build', () => { envName, appId, }; + removeDotConfigDir(projectDirPath); await headlessInit(projectDirPath, amplifyParam, providersParam, codegenParam); expect(checkAmplifyFolderStructure(projectDirPath)).toBeTruthy(); teamProviderInfo = getTeamProviderInfo(projectDirPath); @@ -144,6 +146,7 @@ describe('amplify console build', () => { const clonedProjectDirPath = await util.createNewProjectDir('console-cloned'); fs.copySync(originalProjectDirPath, clonedProjectDirPath); removeFilesForThirdParty(clonedProjectDirPath); + removeDotConfigDir(clonedProjectDirPath); envName = 'devteamb'; const appIdB = await createConsoleApp(projectName, amplifyClient); backendParams = generateBackendEnvParams(appIdB, projectName, envName); diff --git a/packages/amplify-console-integration-tests/src/pullAndInit/amplifyArtifactsManager.ts b/packages/amplify-console-integration-tests/src/pullAndInit/amplifyArtifactsManager.ts index 2d1c179cd64..d34bd8d78c7 100644 --- a/packages/amplify-console-integration-tests/src/pullAndInit/amplifyArtifactsManager.ts +++ b/packages/amplify-console-integration-tests/src/pullAndInit/amplifyArtifactsManager.ts @@ -2,6 +2,14 @@ import * as path from 'path'; import * as fs from 'fs-extra'; import * as util from '../util'; +export function removeDotConfigDir(projectRootDirPath: string) { + const amplifyDirPath = path.join(projectRootDirPath, 'amplify'); + + const dotConfigDirPath = path.join(amplifyDirPath, '.config'); + + fs.removeSync(dotConfigDirPath); +} + export function removeFilesForTeam(projectRootDirPath: string) { const amplifyDirPath = path.join(projectRootDirPath, 'amplify');