diff --git a/.circleci/config.yml b/.circleci/config.yml index da54155fc..d647af9ee 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 diff --git a/synth.py b/synth.py index b4920132f..e4fed06bd 100644 --- a/synth.py +++ b/synth.py @@ -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") diff --git a/system-test/storage.ts b/system-test/storage.ts index 75b472811..4e8c7f06d 100644 --- a/system-test/storage.ts +++ b/system-test/storage.ts @@ -1251,7 +1251,7 @@ describe('storage', () => { // for the key file. let key2 = process.env.GCN_STORAGE_2ND_PROJECT_KEY; if (key2 && key2.charAt(0) === '.') { - key2 = `${__dirname}/../${key2}`; + key2 = `${__dirname}/../../${key2}`; } // Get the service account for the "second" account (the @@ -1381,7 +1381,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)