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

Remove repo-tools from appengine/hello-world/flex #1432

Merged
merged 2 commits into from
Jul 26, 2019
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
2 changes: 1 addition & 1 deletion appengine/hello-world/flexible/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Before you can run or deploy the sample, you need to do the following:

## Deploying to App Engine

npm run deploy
gcloud app deploy

## Running the tests

Expand Down
2 changes: 2 additions & 0 deletions appengine/hello-world/flexible/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ app.listen(PORT, () => {
console.log('Press Ctrl+C to quit.');
});
// [END gae_flex_quickstart]

module.exports = app;
17 changes: 3 additions & 14 deletions appengine/hello-world/flexible/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,14 @@
"node": ">=8.0.0"
},
"scripts": {
"deploy": "gcloud app deploy",
"start": "node app.js",
"system-test": "repo-tools test app",
"test": "npm run system-test",
"e2e-test": "repo-tools test deploy"
"test": "mocha --exit test/*.test.js"
},
"dependencies": {
"express": "^4.16.3"
},
"devDependencies": {
"@google-cloud/nodejs-repo-tools": "^3.3.0"
},
"cloud-repo-tools": {
"test": {
"app": {
"msg": "Hello, world!"
}
},
"requiresKeyFile": true,
"requiresProjectId": true
"mocha": "^6.2.0",
"supertest": "^4.0.2"
}
}
16 changes: 16 additions & 0 deletions appengine/hello-world/flexible/test/app.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const app = require('../app');

const request = require('supertest');

describe('GET /', () => {
it('should get 200', done => {
request(app)
.get('/')
.expect(200, done);
}),
it('should get Hello World', done => {
request(app)
.get('/')
.expect('Hello, world!', done);
});
});
3 changes: 1 addition & 2 deletions appengine/hello-world/standard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
},
"scripts": {
"start": "node app.js",
"system-test": "mocha --exit test/*.test.js",
"test": "npm run system-test"
"test": "mocha --exit test/*.test.js"
},
"dependencies": {
"express": "^4.16.3"
Expand Down