Skip to content

Commit

Permalink
Remove repo-tools from appengine/hello-world/flex (#1432)
Browse files Browse the repository at this point in the history
  • Loading branch information
fhinkel committed Jul 26, 2019
1 parent a7823cf commit f54a37d
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 17 deletions.
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

0 comments on commit f54a37d

Please sign in to comment.