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

Add function emulator back in #644

Merged
merged 7 commits into from
Jun 6, 2018
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
6 changes: 3 additions & 3 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ dependencies:
# Run your tests
test:
override:
# (todo: fhinkel) figure out why these time out and put them back in.
# - functions-emulator config set projectId $GCLOUD_PROJECT && functions-emulator start && cd functions/datastore && npm run system-test && functions-emulator stop
# - functions-emulator config set projectId $GCLOUD_PROJECT && functions-emulator start && cd functions/helloworld && npm run test && functions-emulator stop
- export GCLOUD_PROJECT=nodejs-docs-samples-tests && functions-emulator start && cd functions/datastore && npm test && functions-emulator stop
# Only run if the PR is not coming from a fork.
- if [[ -z $CIRCLE_PR_USERNAME ]] ; then functions-emulator config set projectId $GCLOUD_PROJECT && functions-emulator start && cd functions/helloworld && npm test && functions-emulator stop; fi
- samples test run --cmd nyc -- --cache ava --verbose -T 30s 'functions/background/test/**/*.test.js'
- samples test run --cmd nyc -- --cache ava --verbose -T 30s 'functions/concepts/test/**/*.test.js'
- samples test run --cmd nyc -- --cache ava --verbose -T 30s 'functions/gcs/test/**/*.test.js'
Expand Down
2 changes: 1 addition & 1 deletion functions/datastore/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ test.serial.cb(`get: Fails when entity does not exist`, (t) => {
})
.expect(500)
.expect((response) => {
t.regex(response.text, /No entity found for key/);
t.regex(response.text, /(Missing or insufficient permissions.)|(No entity found for key)/);
})
.end(() => {
setTimeout(t.end, 50); // Subsequent test is flaky without this timeout
Expand Down