From ca385154913163577cf87db70fe6ec445f6fe270 Mon Sep 17 00:00:00 2001 From: Michael Schurter <mschurter@hashicorp.com> Date: Mon, 3 Jan 2022 14:31:58 -0800 Subject: [PATCH] gcs: only run oauth test if env var is set --- get_gcs_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/get_gcs_test.go b/get_gcs_test.go index 1b5890ee7..cdd3e68c9 100644 --- a/get_gcs_test.go +++ b/get_gcs_test.go @@ -239,6 +239,9 @@ func TestGCSGetter_Url(t *testing.T) { } func TestGCSGetter_GetFile_OAuthAccessToken(t *testing.T) { + if os.Getenv("GOOGLE_OAUTH_ACCESS_TOKEN") == "" { + t.Skip("Skipping; set GOOGLE_OAUTH_ACCESS_TOKEN to run") + } g := new(GCSGetter) dst := tempTestFile(t) defer os.RemoveAll(filepath.Dir(dst))