Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update console integration test #6346

Merged
merged 1 commit into from
Jan 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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