From ef2006d7b6ca273624cd6ed8cd33ec2e54924b17 Mon Sep 17 00:00:00 2001 From: Ashley Davis Date: Tue, 9 Mar 2021 14:04:19 +0000 Subject: [PATCH] skip clouddns test when gcloud isn't initialized If gcloud hasn't been installed, or if it has but the default application credential file at .config/gcloud/application_default_credentials.json hasn't been configured, this test would segfault since the assertion at the start fails but doesn't stop the test Signed-off-by: Ashley Davis --- pkg/issuer/acme/dns/clouddns/clouddns_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/issuer/acme/dns/clouddns/clouddns_test.go b/pkg/issuer/acme/dns/clouddns/clouddns_test.go index 4027a2ea2..f601a81da 100644 --- a/pkg/issuer/acme/dns/clouddns/clouddns_test.go +++ b/pkg/issuer/acme/dns/clouddns/clouddns_test.go @@ -109,6 +109,10 @@ func TestLiveGoogleCloudCleanUp(t *testing.T) { } func TestDNSProvider_getHostedZone(t *testing.T) { + if !gcloudLiveTest { + t.Skip("skipping live test") + } + testProvider, err := NewDNSProviderCredentials("my-project", util.RecursiveNameservers, "test-zone") assert.NoError(t, err)