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 914134a commit 4337435
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 8 deletions.
28 changes: 25 additions & 3 deletions packages/google-cloud-dns/samples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,21 @@ anywhere in the world. Read more about [Google Cloud DNS][dns_docs].
* [Setup](#setup)
* [Samples](#samples)
* [Zones](#zones)
* [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 All @@ -41,10 +48,25 @@ Options:
--help Show help [boolean]
Examples:
node zones list Lists all zones in the current project.
node zones.js list Lists all zones in the current project.
For more information, see https://cloud.google.com/dns/docs
```

[zones_docs]: https://cloud.google.com/dns/docs
[zones_code]: zones.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
27 changes: 22 additions & 5 deletions packages/google-cloud-dns/samples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,33 @@
"name": "nodejs-docs-samples-dns",
"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 st -- --verbose dns/system-test/*.test.js"
"lint": "samples lint",
"pretest": "npm run lint",
"system-test": "ava -T 1m --verbose system-test/*.test.js",
"test": "npm run system-test"
},
"dependencies": {
"@google-cloud/dns": "0.5.0",
"yargs": "6.6.0"
"yargs": "7.1.0"
},
"engines": {
"node": ">=4.3.2"
"devDependencies": {
"@google-cloud/nodejs-repo-tools": "1.3.1",
"ava": "0.19.1",
"proxyquire": "1.7.11",
"sinon": "2.1.0"
}
}

0 comments on commit 4337435

Please sign in to comment.