Skip to content

Commit

Permalink
Fix/export pull e2e 2 (#8785)
Browse files Browse the repository at this point in the history
* test(amplify-e2e-tests): adding a setting

* test(amplify-e2e-core): testlambda with latest codebase
  • Loading branch information
ammarkarachi committed Nov 12, 2021
1 parent 3fc4345 commit bcdba67
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/amplify-e2e-core/src/categories/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1268,7 +1268,7 @@ export function updateAuthAddUserGroups(projectDir: string, groupNames: string[]
if (groupNames.length == 0) {
return;
}
const testingWithLatestCodebase = settings.testingWithLatestCodebase ?? false;
const testingWithLatestCodebase = settings && settings.testingWithLatestCodebase ? settings.testingWithLatestCodebase : false;
return new Promise((resolve, reject) => {
const chain = spawn(getCLIPath(testingWithLatestCodebase), ['update', 'auth'], { cwd: projectDir, stripColors: true });
if (settings?.overrides?.category === 'auth') {
Expand Down
9 changes: 1 addition & 8 deletions packages/amplify-e2e-tests/src/__tests__/api_2.test.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
import {
addApiWithBlankSchemaAndConflictDetection,
addApiWithoutSchema,
addFunction,
addRestApi,
addSimpleDDB,
amplifyPush,
amplifyPushUpdate,
apiDisableDataStore,
apiEnableDataStore,
checkIfBucketExists,
createNewProjectDir,
deleteProject,
deleteProjectDir,
Expand All @@ -18,14 +14,11 @@ import {
getProjectMeta,
getTransformConfig,
initJSProjectWithProfile,
listAttachedRolePolicies,
listRolePolicies,
updateApiSchema,
updateAPIWithResolutionStrategyWithModels,
updateAuthAddAdminQueries,
} from 'amplify-e2e-core';
import AWSAppSyncClient, { AUTH_TYPE } from 'aws-appsync';
import { existsSync, readdirSync, readFileSync, writeFileSync } from 'fs';
import { existsSync } from 'fs';
import gql from 'graphql-tag';
import { TRANSFORM_CURRENT_VERSION } from 'graphql-transformer-core';
import _ from 'lodash';
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-e2e-tests/src/__tests__/api_5.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ describe('amplify add api (REST)', () => {
allowGuestUsers: false,
});
await addRestApi(projRoot, { isFirstRestApi: false, existingLambda: true });
await updateAuthAddAdminQueries(projRoot);
await updateAuthAddAdminQueries(projRoot, undefined, {});
await amplifyPushUpdate(projRoot);

const amplifyMeta = getProjectMeta(projRoot);
Expand Down

0 comments on commit bcdba67

Please sign in to comment.