File tree Expand file tree Collapse file tree 7 files changed +11
-3
lines changed Expand file tree Collapse file tree 7 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ export NVM_DIR="$HOME/.nvm"
29
29
nvm install 10
30
30
31
31
export NODE_ENV=development
32
- export E2E_TESTS=true # test the deployed app
32
+ export E2E_TESTS=true # test the deployed app, used by repo-tools.getRequest()
33
33
34
34
# Register post-test cleanup
35
35
export GAE_VERSION=${BOOKSHELF_DIRECTORY: 0: 1} -${DATA_BACKEND}
@@ -54,21 +54,23 @@ function cleanup {
54
54
trap cleanup EXIT
55
55
56
56
# Configure gcloud
57
+ # Export the project as repo-tools e2e tests rely on it:
58
+ # `https://${opts.version}-dot-${opts.project}.appspot.com`.
57
59
export GCLOUD_PROJECT=nodejs-getting-started-tests
58
60
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR} /secrets-key.json
59
61
gcloud auth activate-service-account --key-file " $GOOGLE_APPLICATION_CREDENTIALS "
60
62
gcloud config set project $GCLOUD_PROJECT
61
63
62
64
# Install Node dependencies
63
- yarn global add @google-cloud/nodejs-repo-tools
65
+ npm i -g @google-cloud/nodejs-repo-tools
64
66
cd github/nodejs-getting-started/${BOOKSHELF_DIRECTORY}
65
67
66
68
# Copy secrets
67
69
cp ${KOKORO_GFILE_DIR} /secrets-config.json config.json
68
70
cp $GOOGLE_APPLICATION_CREDENTIALS key.json
69
71
70
72
# Install dependencies (for running the tests, not the apps themselves)
71
- yarn install
73
+ npm install
72
74
73
75
# Deploy a single step
74
76
gcloud app deploy --version $GAE_VERSION --no-promote # nodejs-repo-tools doesn't support specifying versions, so deploy manually
Original file line number Diff line number Diff line change @@ -29,4 +29,5 @@ module.exports = {
29
29
url : `http://localhost:${ PORT } ` ,
30
30
version : process . env . GAE_VERSION || TESTNAME ,
31
31
msg : `Bookshelf` ,
32
+ project : process . env . GCLOUD_PROJECT , // needed for e2e URL
32
33
} ;
Original file line number Diff line number Diff line change @@ -29,4 +29,5 @@ module.exports = {
29
29
url : `http://localhost:${ PORT } ` ,
30
30
version : process . env . GAE_VERSION || TESTNAME ,
31
31
msg : `Bookshelf` ,
32
+ project : process . env . GCLOUD_PROJECT , // needed for e2e URL
32
33
} ;
Original file line number Diff line number Diff line change @@ -29,4 +29,5 @@ module.exports = {
29
29
url : `http://localhost:${ PORT } ` ,
30
30
version : process . env . GAE_VERSION || TESTNAME ,
31
31
msg : `Bookshelf` ,
32
+ project : process . env . GCLOUD_PROJECT , // needed for e2e URL
32
33
} ;
Original file line number Diff line number Diff line change @@ -29,4 +29,5 @@ module.exports = {
29
29
url : `http://localhost:${ PORT } ` ,
30
30
version : process . env . GAE_VERSION || TESTNAME ,
31
31
msg : `Bookshelf` ,
32
+ project : process . env . GCLOUD_PROJECT , // needed for e2e URL
32
33
} ;
Original file line number Diff line number Diff line change @@ -30,4 +30,5 @@ module.exports = {
30
30
PORT : PORT ,
31
31
TOPIC_NAME : `book-process-queue-${ TESTNAME } ` ,
32
32
} ,
33
+ project : process . env . GCLOUD_PROJECT , // needed for e2e URL
33
34
} ;
Original file line number Diff line number Diff line change @@ -31,4 +31,5 @@ module.exports = {
31
31
SUBSCRIPTION_NAME : `shared-worker-subscription-${ TESTNAME } ` ,
32
32
TOPIC_NAME : `book-process-queue-${ TESTNAME } ` ,
33
33
} ,
34
+ project : process . env . GCLOUD_PROJECT , // needed for e2e URL
34
35
} ;
You can’t perform that action at this time.
0 commit comments