Skip to content

Commit

Permalink
test: fail when system-tests do not run (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith authored and stephenplusplus committed Aug 20, 2018
1 parent b768f7f commit 4c84d04
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion packages/google-cloud-dns/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
"eslint-config-prettier": "^3.0.0",
"eslint-plugin-node": "^7.0.0",
"eslint-plugin-prettier": "^2.6.0",
"extend": "^3.0.1",
"ink-docstrap": "^1.3.2",
"intelli-espower-loader": "^1.0.1",
"jsdoc": "^3.5.5",
Expand Down
8 changes: 7 additions & 1 deletion packages/google-cloud-dns/system-test/dns.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,14 @@ const DNS = require('../');
const dns = new DNS();
const DNS_DOMAIN = process.env.GCLOUD_TESTS_DNS_DOMAIN;

if (!DNS_DOMAIN) {
assert.fail(
`The 'GCLOUD_TESTS_DNS_DOMAIN' environment variable must be set to run the system tests.`
);
}

// Only run the tests if there is a domain to test with.
(DNS_DOMAIN ? describe : describe.skip)('dns', function() {
describe('dns', function() {
if (!DNS_DOMAIN) {
// The test runner still executes this function, even if it is skipped.
return;
Expand Down

0 comments on commit 4c84d04

Please sign in to comment.