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

test: skip installation test if GOOGLE_CLOUD_TESTS_IN_VPCSC is passed #345

Merged
merged 12 commits into from
Feb 15, 2019
21 changes: 21 additions & 0 deletions .kokoro/pre-system-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -xeo pipefail

# Run an installation test to verify compiled Javascript is valid
npm install
npm run install-test
2 changes: 1 addition & 1 deletion system-test/install.ts → install-test/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ it('should be able to use the d.ts', async () => {
await execa('npm', ['pack'], {stdio: 'inherit'});
const tarball = `google-cloud-bigquery-${pkg.version}.tgz`;
await mvp(tarball, `${stagingPath}/google-cloud-bigquery.tgz`);
await ncpp('system-test/fixtures/kitchen', `${stagingPath}/`);
await ncpp('install-test/fixtures/kitchen', `${stagingPath}/`);
await execa('npm', ['install'], {cwd: `${stagingPath}/`, stdio: 'inherit'});
}).timeout(40000);

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"samples-test": "cd samples/ && npm link ../ && npm test && cd ../",
"test": "nyc mocha build/test",
"system-test": "mocha build/system-test --timeout 600000",
"install-test": "mocha build/install-test --timeout 600000",
"presystem-test": "npm run compile",
"check": "gts check",
"clean": "gts clean",
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"src/*.ts",
"test/*.ts",
"system-test/*.ts",
"install-test/*.ts",
"benchmark/*.ts"
]
}