test(backend): gcs

main
sundowndev 2021-12-14 18:42:38 +04:00
parent c7b795e608
commit 7e805feb5a
No known key found for this signature in database
GPG Key ID: 100CE2799D978462
2 changed files with 10 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import (
"fmt"
"io"
"net/http"
"os"
"reflect"
"testing"
@ -34,6 +35,8 @@ func TestGSBackendInvalid(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
_ = os.Setenv("GOOGLE_APPLICATION_CREDENTIALS", "testdata/gcp_application_default_credentials.json")
got, err := NewGSReader(tt.args.path)
if err.Error() != tt.wantErr.Error() {
t.Errorf("NewGSReader() error = '%s', wantErr '%s'", err, tt.wantErr)

View File

@ -0,0 +1,7 @@
{
"client_id": "testdata.driftctl.apps.googleusercontent.com",
"client_secret": "fake-secret",
"quota_project_id": "fake-project-id",
"refresh_token": "fake-token",
"type": "authorized_user"
}