From 0e6ca80a709a37f75a50dca890236be0d4695149 Mon Sep 17 00:00:00 2001 From: Euan Kemp Date: Tue, 27 Feb 2018 15:36:00 -0800 Subject: [PATCH] issuer/route53: remove zone-id env test The zone id is never read from the environment; this test tests functionality which doesn't exist in the actual software, so there's no point in having it. --- pkg/issuer/acme/dns/route53/route53_test.go | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/pkg/issuer/acme/dns/route53/route53_test.go b/pkg/issuer/acme/dns/route53/route53_test.go index 3f76f7252..e43e7b60a 100644 --- a/pkg/issuer/acme/dns/route53/route53_test.go +++ b/pkg/issuer/acme/dns/route53/route53_test.go @@ -23,14 +23,12 @@ func init() { route53Key = os.Getenv("AWS_ACCESS_KEY_ID") route53Secret = os.Getenv("AWS_SECRET_ACCESS_KEY") route53Region = os.Getenv("AWS_REGION") - route53Zone = os.Getenv("AWS_HOSTED_ZONE_ID") } func restoreRoute53Env() { os.Setenv("AWS_ACCESS_KEY_ID", route53Key) os.Setenv("AWS_SECRET_ACCESS_KEY", route53Secret) os.Setenv("AWS_REGION", route53Region) - os.Setenv("AWS_HOSTED_ZONE_ID", route53Zone) } func makeRoute53Provider(ts *httptest.Server) *DNSProvider { @@ -70,21 +68,6 @@ func TestRegionFromEnv(t *testing.T) { restoreRoute53Env() } -func TestHostedZoneIDFromEnv(t *testing.T) { - const testZoneID = "testzoneid" - - defer restoreRoute53Env() - os.Setenv("AWS_HOSTED_ZONE_ID", testZoneID) - - provider, err := NewDNSProviderAccessKey("", "", "", "") - assert.NoError(t, err, "Expected no error constructing DNSProvider") - - fqdn, err := provider.getHostedZoneID("whatever") - assert.NoError(t, err, "Expected FQDN to be resolved to environment variable value") - - assert.Equal(t, testZoneID, fqdn) -} - func TestRoute53Present(t *testing.T) { mockResponses := MockResponseMap{ "/2013-04-01/hostedzonesbyname": MockResponse{StatusCode: 200, Body: ListHostedZonesByNameResponse},