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

feat(amplify-e2e-tests): removed json stringify #6920

Merged
merged 1 commit into from
Mar 19, 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
70 changes: 35 additions & 35 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ orbs:
aws-ecr: circleci/[email protected]
machine:
environment:
PATH: '${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin'
node12:
PATH: ${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin
node10:
working_directory: ~/repo
docker: &ref_0
- image: 'circleci/node:10'
- image: circleci/node:10
auth:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_ACCESS_TOKEN
resource_class: large
defaults:
working_directory: ~/repo
docker: &ref_1
- image: '${AWS_ECR_ACCOUNT_URL}/amplify-cli-e2e-base-image-repo:latest'
- image: ${AWS_ECR_ACCOUNT_URL}/amplify-cli-e2e-base-image-repo:latest
aws_auth:
aws_access_key_id: $ECR_ACCESS_KEY
aws_secret_access_key: $ECR_SECRET_ACCESS_KEY
Expand All @@ -42,7 +42,7 @@ run_e2e_tests: &ref_3
unsetNpmRegistryUrl
no_output_timeout: 90m
install_cli_from_local_registery: &ref_2
name: 'Start verdaccio, install node CLI and amplify-app'
name: Start verdaccio, install node CLI and amplify-app
command: |
source .circleci/local_publish_helpers.sh
startLocalRegistry "$(pwd)/.circleci/verdaccio.yaml"
Expand All @@ -60,11 +60,11 @@ jobs:
- checkout
- run: yarn run production-build
- save_cache:
key: 'amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}'
key: amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
paths:
- ~/.cache
- save_cache:
key: 'amplify-cli-ssh-deps-{{ .Branch }}'
key: amplify-cli-ssh-deps-{{ .Branch }}
paths:
- ~/.ssh
- persist_to_workspace:
Expand All @@ -78,7 +78,7 @@ jobs:
- attach_workspace:
at: ./
- restore_cache:
key: 'amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}'
key: amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
- run:
name: Install Java
command: sudo apt-get install default-jdk
Expand All @@ -99,7 +99,7 @@ jobs:
- attach_workspace:
at: ./
- restore_cache:
key: 'amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}'
key: amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
- run:
name: Install Java
command: sudo apt-get install default-jdk
Expand All @@ -119,7 +119,7 @@ jobs:
- attach_workspace:
at: ./
- restore_cache:
key: 'amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}'
key: amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
- run:
name: Publish to verdaccio
command: |
Expand All @@ -141,15 +141,15 @@ jobs:
name: Save new amplify GitHub tag
command: node scripts/echo-current-cli-version.js > .amplify-pkg-version
- save_cache:
key: 'amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }}'
key: amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }}
paths:
- ~/verdaccio-cache/
- save_cache:
key: 'amplify-unified-changelog-{{ .Branch }}-{{ .Revision }}'
key: amplify-unified-changelog-{{ .Branch }}-{{ .Revision }}
paths:
- ~/repo/UNIFIED_CHANGELOG.md
- save_cache:
key: 'amplfiy-pkg-tag-{{ .Branch }}-{{ .Revision }}'
key: amplfiy-pkg-tag-{{ .Branch }}-{{ .Revision }}
paths:
- ~/repo/.amplify-pkg-version
build_pkg_binaries:
Expand All @@ -160,9 +160,9 @@ jobs:
- attach_workspace:
at: ./
- restore_cache:
key: 'amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}'
key: amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
- restore_cache:
key: 'amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }}'
key: amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }}
- run:
name: Start verdaccio and package CLI
command: |
Expand All @@ -173,7 +173,7 @@ jobs:
yarn pkg-all
unsetNpmRegistryUrl
- save_cache:
key: 'amplify-pkg-binaries-{{ .Branch }}-{{ .Revision }}'
key: amplify-pkg-binaries-{{ .Branch }}-{{ .Revision }}
paths:
- ~/repo/out
graphql_e2e_tests:
Expand All @@ -184,7 +184,7 @@ jobs:
- attach_workspace:
at: ./
- restore_cache:
key: 'amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}'
key: amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
- run:
name: Run GraphQL end-to-end tests
command: >-
Expand All @@ -201,7 +201,7 @@ jobs:
- attach_workspace:
at: ./
- restore_cache:
key: 'amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }}'
key: amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }}
- run:
name: Update OS Packages
command: sudo apt-get update
Expand All @@ -223,7 +223,7 @@ jobs:
- attach_workspace:
at: ./
- restore_cache:
key: 'amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }}'
key: amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }}
- run: *ref_2
- run: *ref_3
- store_test_results:
Expand Down Expand Up @@ -253,9 +253,9 @@ jobs:
- attach_workspace:
at: ./
- restore_cache:
key: 'amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}'
key: amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
- restore_cache:
key: 'amplify-pkg-binaries-{{ .Branch }}-{{ .Revision }}'
key: amplify-pkg-binaries-{{ .Branch }}-{{ .Revision }}
- run:
name: Symlink Amplify packaged CLI
command: |
Expand All @@ -278,7 +278,7 @@ jobs:
- attach_workspace:
at: ./
- restore_cache:
key: 'amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}'
key: amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
- run:
name: Run tests migrating from CLI v4.0.0
command: |
Expand All @@ -301,7 +301,7 @@ jobs:
- attach_workspace:
at: ./
- restore_cache:
key: 'amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}'
key: amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
- run:
name: Update OS Packages
command: sudo apt-get update
Expand All @@ -325,7 +325,7 @@ jobs:
- attach_workspace:
at: ./
- restore_cache:
key: 'amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}'
key: amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
- run:
name: Run tests migrating from latest CLI
command: |
Expand All @@ -346,7 +346,7 @@ jobs:
- attach_workspace:
at: ./
- restore_cache:
key: 'amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }}'
key: amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }}
- run: *ref_2
- run:
command: |
Expand All @@ -365,7 +365,7 @@ jobs:
integration_test:
working_directory: ~/repo
docker:
- image: 'cypress/base:10.18.0'
- image: cypress/base:10.18.0
environment:
TERM: dumb
resource_class: large
Expand Down Expand Up @@ -423,7 +423,7 @@ jobs:

node_modules/.bin/cypress run --spec $(find . -type f -name
'auth_spec*')
- run: 'sudo kill -9 $(lsof -t -i:3000)'
- run: sudo kill -9 $(lsof -t -i:3000)
- run: cd .circleci/ && chmod +x delete_auth.sh
- run: expect .circleci/delete_auth.exp
- run:
Expand Down Expand Up @@ -480,10 +480,10 @@ jobs:
at: ./
- restore_cache:
keys:
- 'amplify-cli-ssh-deps-{{ .Branch }}'
- amplify-cli-ssh-deps-{{ .Branch }}
- run:
name: Authenticate with npm
command: 'echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc'
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
- run:
name: Publish Amplify CLI
command: |
Expand All @@ -502,11 +502,11 @@ jobs:
- attach_workspace:
at: ./
- restore_cache:
key: 'amplify-unified-changelog-{{ .Branch }}-{{ .Revision }}'
key: amplify-unified-changelog-{{ .Branch }}-{{ .Revision }}
- restore_cache:
key: 'amplify-pkg-binaries-{{ .Branch }}-{{ .Revision }}'
key: amplify-pkg-binaries-{{ .Branch }}-{{ .Revision }}
- restore_cache:
key: 'amplfiy-pkg-tag-{{ .Branch }}-{{ .Revision }}'
key: amplfiy-pkg-tag-{{ .Branch }}-{{ .Revision }}
- run:
name: Compress binaries
command: |
Expand All @@ -525,7 +525,7 @@ jobs:
resource_class: large
steps:
- restore_cache:
key: 'amplfiy-pkg-tag-{{ .Branch }}-{{ .Revision }}'
key: amplfiy-pkg-tag-{{ .Branch }}-{{ .Revision }}
- run:
name: Install packaged Amplify CLI
command: >
Expand All @@ -547,9 +547,9 @@ jobs:
- attach_workspace:
at: ./
- restore_cache:
key: 'amplify-pkg-binaries-{{ .Branch }}-{{ .Revision }}'
key: amplify-pkg-binaries-{{ .Branch }}-{{ .Revision }}
- restore_cache:
key: 'amplfiy-pkg-tag-{{ .Branch }}-{{ .Revision }}'
key: amplfiy-pkg-tag-{{ .Branch }}-{{ .Revision }}
- run:
name: Publish Amplify CLI GitHub release
command: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe('python function tests', () => {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'OPTIONS,POST,GET',
};
const message: string = JSON.stringify('Hello from your new Amplify Python lambda!');
const message: string = 'Hello from your new Amplify Python lambda!';
const helloWorldSuccessOutput = {
statusCode: statusCode,
headers: headers,
Expand Down