Skip to content

Commit d88b34c

Browse files
authored
New test case for GCS (#29)
1 parent 94be7a4 commit d88b34c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

storage/storage_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,18 @@ var opts = []option.ClientOption{
2727
option.WithCredentialsFile("../testdata/service_account.json"),
2828
}
2929

30+
func TestNewClientError(t *testing.T) {
31+
invalid := []option.ClientOption{
32+
option.WithCredentialsFile("../testdata/non_existing.json"),
33+
}
34+
client, err := NewClient(context.Background(), &internal.StorageConfig{
35+
Opts: invalid,
36+
})
37+
if client != nil || err == nil {
38+
t.Errorf("NewClient() = (%v, %v); want (nil, error)", client, err)
39+
}
40+
}
41+
3042
func TestNoBucketName(t *testing.T) {
3143
client, err := NewClient(context.Background(), &internal.StorageConfig{
3244
Opts: opts,

0 commit comments

Comments
 (0)