Skip to content

Commit

Permalink
Cleanup App Engine samples and re-work tests. (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdobry authored and Ace Nassri committed Apr 24, 2017
1 parent b0f451a commit 6272077
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 10 deletions.
26 changes: 24 additions & 2 deletions packages/google-cloud-compute/samples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,21 @@ Google infrastructure.
* [Sending mail with Mailjet](#sending-mail-with-mailjet)
* [Listing instances (recommended)](#listing-instances-recommended)
* [Listing instances](#listing-instances)
* [Running the tests](#running-the-tests)

## Setup

1. Read [Prerequisites][prereq] and [How to run a sample][run] first.
1. Install dependencies:
1. Read [Prerequisites][prereq] and [How to run a sample][run] first.
1. Install dependencies:

With `npm`:

npm install

With `yarn`:

yarn install

[prereq]: ../README.md#prerequisities
[run]: ../README.md#how-to-run-a-sample

Expand Down Expand Up @@ -91,3 +98,18 @@ __Run the sample:__

[vms_api_docs]: https://cloud.google.com/compute/docs/tutorials/nodejs-guide
[vms_api_code]: vms_api.js

## Running the tests

1. Set the `GCLOUD_PROJECT` and `GOOGLE_APPLICATION_CREDENTIALS` environment
variables.

1. Run the tests:

With `npm`:

npm test

With `yarn`:

yarn test
35 changes: 27 additions & 8 deletions packages/google-cloud-compute/samples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,36 @@
"name": "nodejs-docs-samples-computeengine",
"version": "0.0.1",
"private": true,
"license": "Apache Version 2.0",
"license": "Apache-2.0",
"author": "Google Inc.",
"repository": {
"type": "git",
"url": "https://github.com/GoogleCloudPlatform/nodejs-docs-samples.git"
},
"cloud": {
"requiresKeyFile": true,
"requiresProjectId": true
},
"engines": {
"node": ">=4.3.2"
},
"scripts": {
"test": "cd ..; npm run t -- computeengine/test/*.test.js",
"system-test": "cd ..; npm run t -- computeengine/system-test/*.test.js"
"lint": "samples lint",
"pretest": "npm run lint",
"unit-test": "ava -T 20s --verbose test/*.test.js",
"system-test": "ava -T 20s --verbose system-test/*.test.js",
"test": "npm run unit-test && npm run system-test"
},
"dependencies": {
"@google-cloud/compute": "0.6.0",
"googleapis": "18.0.0",
"nodemailer": "2.7.0",
"nodemailer-smtp-transport": "2.7.2",
"sendgrid": "4.7.1"
"@google-cloud/compute": "0.7.1",
"googleapis": "19.0.0",
"nodemailer": "4.0.1",
"nodemailer-smtp-transport": "2.7.4",
"sendgrid": "5.0.0"
},
"devDependencies": {
"@google-cloud/nodejs-repo-tools": "1.3.1",
"ava": "0.19.1",
"proxyquire": "1.7.11"
}
}

0 comments on commit 6272077

Please sign in to comment.