Skip to content

Commit 52eb858

Browse files
tests: correct system tests for envs without projectId
1 parent e0c50f5 commit 52eb858

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

handwritten/storage/system-test/storage.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,6 +1169,11 @@ describe('storage', function() {
11691169
var file;
11701170

11711171
before(function(done) {
1172+
if (!env.credentials && !env.keyFilename) {
1173+
this.skip();
1174+
return;
1175+
}
1176+
11721177
file = bucket.file('LogoToSign.jpg');
11731178
fs.createReadStream(FILES.logo.path)
11741179
.pipe(file.createWriteStream())
@@ -1211,15 +1216,22 @@ describe('storage', function() {
12111216
var file;
12121217

12131218
before(function(done) {
1219+
if (!env.credentials && !env.keyFilename) {
1220+
this.skip();
1221+
return;
1222+
}
1223+
12141224
file = bucket.file('LogoToSign.jpg');
12151225
fs.createReadStream(FILES.logo.path)
12161226
.pipe(file.createWriteStream())
12171227
.on('error', done)
12181228
.on('finish', done.bind(null, null));
12191229
});
12201230

1221-
after(function(done) {
1222-
file.delete(done);
1231+
beforeEach(function() {
1232+
if (!storage.projectId) {
1233+
this.skip();
1234+
}
12231235
});
12241236

12251237
it('should create a policy', function(done) {

0 commit comments

Comments
 (0)