-
Notifications
You must be signed in to change notification settings - Fork 816
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fetch deployment key from current-cloud-backend (#12687)
* fix: fetch deployment key from current-cloud-backend * fix: fix e2e
- Loading branch information
Showing
3 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
type Todo @model @auth(rules: [{ allow: private, provider: iam }]) { | ||
id: ID! | ||
name: String! | ||
description: String | ||
description1: String | ||
} |
38 changes: 38 additions & 0 deletions
38
packages/amplify-e2e-tests/src/__tests__/function_13.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { | ||
addApi, | ||
addFunction, | ||
amplifyPush, | ||
amplifyPushCategoryWithYesFlag, | ||
createNewProjectDir, | ||
deleteProject, | ||
deleteProjectDir, | ||
generateRandomShortId, | ||
initJSProjectWithProfile, | ||
updateApiSchema, | ||
} from '@aws-amplify/amplify-e2e-core'; | ||
|
||
describe('amplify push function cases:', () => { | ||
let projRoot: string; | ||
|
||
beforeEach(async () => { | ||
projRoot = await createNewProjectDir('lambda-appsync-nodejs'); | ||
}); | ||
|
||
afterEach(async () => { | ||
await deleteProject(projRoot); | ||
deleteProjectDir(projRoot); | ||
}); | ||
|
||
it('Test case when IAM is set as default auth and api is already deployed and pushing function', async () => { | ||
const projName = `iammodel${generateRandomShortId()}`; | ||
await initJSProjectWithProfile(projRoot, { name: projName }); | ||
await addApi(projRoot, { IAM: {}, transformerVersion: 2 }); | ||
updateApiSchema(projRoot, projName, 'iam_simple_model.graphql'); | ||
await amplifyPush(projRoot); | ||
// update api | ||
updateApiSchema(projRoot, projName, 'iam_simple_model1.graphql'); | ||
await addFunction(projRoot, { functionTemplate: 'Hello World' }, 'nodejs'); | ||
// should only push function | ||
await amplifyPushCategoryWithYesFlag(projRoot, 'function', true); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters