mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-10-22 23:31:00 +02:00
Allow for DNSimple User API tokens to be used by implementing the DNSIMPLE_ACCOUNT_ID and DNSIMPLE_ZONES environment variables
Update tests to check that the dnsimpleSuitableZone function works properly when the DNSIMPLE_ZONES environment variable is set
This commit is contained in:
parent
26694e4b26
commit
d0c121b97c
@ -227,6 +227,17 @@ func testDnsimpleSuitableZone(t *testing.T) {
|
||||
|
||||
zone := dnsimpleSuitableZone("example-beta.example.com", zones)
|
||||
assert.Equal(t, zone.Name, "example.com")
|
||||
|
||||
os.Setenv("DNSIMPLE_ZONES", "environment-example.com,example.environment-example.com")
|
||||
mockProvider.accountID = "3"
|
||||
zones, err = mockProvider.Zones(ctx)
|
||||
assert.Nil(t, err)
|
||||
|
||||
zone = dnsimpleSuitableZone("hello.example.environment-example.com", zones)
|
||||
assert.Equal(t, zone.Name, "example.environment-example.com")
|
||||
|
||||
os.Unsetenv("DNSIMPLE_ZONES")
|
||||
mockProvider.accountID = "1"
|
||||
}
|
||||
|
||||
func TestNewDnsimpleProvider(t *testing.T) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user