Skip to content

Commit

Permalink
chore: update console integration test (#6346)
Browse files Browse the repository at this point in the history
  • Loading branch information
Attila Hajdrik authored Jan 8, 2021
1 parent 12eb35f commit 8486632
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import {
checkAmplifyFolderStructure,
getTeamProviderInfo,
getProjectConfig,
removeDotConfigDir,
} from '../src/pullAndInit/amplifyArtifactsManager';
import * as util from '../src/util';

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down

0 comments on commit 8486632

Please sign in to comment.