Skip to content

Commit

Permalink
chore: fix credential fetching
Browse files Browse the repository at this point in the history
Signed-off-by: Siddhant N Trivedi <[email protected]>
  • Loading branch information
siddhant-deepsource committed Jul 27, 2023
1 parent 1fd94f4 commit 38c3458
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions storage/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ import (
"path/filepath"

"cloud.google.com/go/storage"
"google.golang.org/api/option"
)

type MockCloudStorageClient struct {
client *storage.Client
}

func NewMockCloudStorageClient(ctx context.Context, _ []byte) (*MockCloudStorageClient, error) {
client, err := storage.NewClient(ctx)
func NewMockCloudStorageClient(ctx context.Context, credentialsJSON []byte) (*MockCloudStorageClient, error) {
client, err := storage.NewClient(ctx, option.WithCredentialsJSON(credentialsJSON))
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 38c3458

Please sign in to comment.