diff options
author | a <[email protected]> | 2024-06-18 18:16:33 -0500 |
---|---|---|
committer | a <[email protected]> | 2024-06-18 18:16:33 -0500 |
commit | 93a185302216c404602cb7635eac5cb31cbf6cd7 (patch) | |
tree | 734f341ffb0374cac14044d40b5389b4ceb4bf17 /caddytest/integration/acmeserver_test.go | |
parent | 8e0d3e1ec56cd349f02c9d201234c56373688ddd (diff) | |
download | caddy-93a185302216c404602cb7635eac5cb31cbf6cd7.tar.gz caddy-93a185302216c404602cb7635eac5cb31cbf6cd7.zip |
noot
Diffstat (limited to 'caddytest/integration/acmeserver_test.go')
-rw-r--r-- | caddytest/integration/acmeserver_test.go | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/caddytest/integration/acmeserver_test.go b/caddytest/integration/acmeserver_test.go index 22b716f84..f05fb836e 100644 --- a/caddytest/integration/acmeserver_test.go +++ b/caddytest/integration/acmeserver_test.go @@ -8,10 +8,10 @@ import ( "strings" "testing" + "github.com/caddyserver/caddy/v2" "github.com/caddyserver/caddy/v2/caddytest" "github.com/mholt/acmez/v2" "github.com/mholt/acmez/v2/acme" - "go.uber.org/zap" ) func TestACMEServerDirectory(t *testing.T) { @@ -66,11 +66,7 @@ func TestACMEServerAllowPolicy(t *testing.T) { `, "caddyfile") ctx := context.Background() - logger, err := zap.NewDevelopment() - if err != nil { - t.Error(err) - return - } + logger := caddy.Log().Named("acmez") client := acmez.Client{ Client: &acme.Client{ @@ -155,11 +151,7 @@ func TestACMEServerDenyPolicy(t *testing.T) { `, "caddyfile") ctx := context.Background() - logger, err := zap.NewDevelopment() - if err != nil { - t.Error(err) - return - } + logger := caddy.Log().Named("acmez") client := acmez.Client{ Client: &acme.Client{ @@ -197,7 +189,7 @@ func TestACMEServerDenyPolicy(t *testing.T) { _, err := client.ObtainCertificateForSANs(ctx, account, certPrivateKey, []string{"deny.localhost"}) if err == nil { t.Errorf("obtaining certificate for 'deny.localhost' domain") - } else if err != nil && !strings.Contains(err.Error(), "urn:ietf:params:acme:error:rejectedIdentifier") { + } else if !strings.Contains(err.Error(), "urn:ietf:params:acme:error:rejectedIdentifier") { t.Logf("unexpected error: %v", err) } } |