Skip to content

Commit

Permalink
fix(tests): fix system tests on CircleCI (#431)
Browse files Browse the repository at this point in the history
* get around resumable upload config dir perm issues

* do not assert.ifError when doing doubleTest
  • Loading branch information
jkwlui authored Oct 8, 2018
1 parent ec27023 commit 951bc83
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ jobs:
- run: *npm_install_and_link
- run:
name: Run system tests.
command: npm run system-test
command: mkdir $HOME/.config && npm run system-test
environment:
GCLOUD_PROJECT: long-door-651
GOOGLE_APPLICATION_CREDENTIALS: .circleci/key.json
Expand Down
7 changes: 7 additions & 0 deletions synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,10 @@
common_templates = gcp.CommonTemplates()
templates = common_templates.node_library(source_location='build')
s.copy(templates)

# Create .config directory under $HOME to get around permissions issues
# with resumable upload.
s.replace(
".circleci/config.yml",
"command: npm run system-test",
"command: mkdir $HOME/.config && npm run system-test")
5 changes: 4 additions & 1 deletion system-test/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,10 @@ describe('storage', () => {

it('file#createResumableUpload', doubleTest((options, done) => {
file.createResumableUpload(options, (err, uri) => {
assert.ifError(err);
if (err) {
done(err);
return;
}

file.createWriteStream({uri})
.on('error', done)
Expand Down

0 comments on commit 951bc83

Please sign in to comment.