minor cleanups

Signed-off-by: JuanJo Ciarlante <juanjosec@gmail.com>
This commit is contained in:
JuanJo Ciarlante 2018-08-28 22:23:57 -03:00
parent 225a37ce7c
commit 1266f4116b
No known key found for this signature in database
GPG Key ID: A3F7E24966727177
2 changed files with 3 additions and 5 deletions

View File

@ -50,21 +50,19 @@ func TestValidJsonAccount(t *testing.T) {
}`)
provider, err := NewDNSProviderHostBytes("http://localhost/", accountJson, util.RecursiveNameservers)
assert.NoError(t, err, "Expected no error constructing DNSProvider")
assert.NoError(t, err, "Expected account to be set from JSON")
assert.Equal(t, provider.accounts["domain"].FullDomain, "fooldom")
}
func TestNoValidJsonAccount(t *testing.T) {
accountJson := []byte(`{"duck": "quack"}`)
_, err := NewDNSProviderHostBytes("http://localhost/", accountJson, util.RecursiveNameservers)
assert.Error(t, err, "Expected no error constructing DNSProvider")
assert.Error(t, err, "Expected error constructing DNSProvider from invalid accountJson")
}
func TestNoValidJson(t *testing.T) {
accountJson := []byte("b00m")
_, err := NewDNSProviderHostBytes("http://localhost/", accountJson, util.RecursiveNameservers)
assert.Error(t, err, "Expected no error constructing DNSProvider")
assert.Error(t, err, "Expected error constructing DNSProvider from invalid JSON")
}
func TestLiveAcmeDnsPresent(t *testing.T) {

View File

@ -214,7 +214,7 @@ func TestSolverFor(t *testing.T) {
Builder: &test.Builder{
KubeObjects: []runtime.Object{
newSecret("acmedns-key", "default", map[string][]byte{
"acmedns.json": []byte("{x}"),
"acmedns.json": []byte("{}"),
}),
},
},