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.
This commit is contained in:
parent
14c109af46
commit
0e6ca80a70
@ -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},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user