diff --git a/acme/client_test.go b/acme/client_test.go index c94d8f3e..9ba165ed 100644 --- a/acme/client_test.go +++ b/acme/client_test.go @@ -82,10 +82,10 @@ func TestClientOptPort(t *testing.T) { if httpSolver.jws != client.jws { t.Error("Expected http-01 to have same jws as client") } - if got := httpSolver.provider.(*httpChallengeServer).port; got != optPort { + if got := httpSolver.provider.(*HTTPProviderServer).port; got != optPort { t.Errorf("Expected http-01 to have port %s but was %s", optPort, got) } - if got := httpSolver.provider.(*httpChallengeServer).iface; got != optHost { + if got := httpSolver.provider.(*HTTPProviderServer).iface; got != optHost { t.Errorf("Expected http-01 to have iface %s but was %s", optHost, got) } @@ -96,10 +96,10 @@ func TestClientOptPort(t *testing.T) { if httpsSolver.jws != client.jws { t.Error("Expected tls-sni-01 to have same jws as client") } - if got := httpsSolver.provider.(*tlsSNIChallengeServer).port; got != optPort { + if got := httpsSolver.provider.(*TLSProviderServer).port; got != optPort { t.Errorf("Expected tls-sni-01 to have port %s but was %s", optPort, got) } - if got := httpsSolver.provider.(*tlsSNIChallengeServer).iface; got != optHost { + if got := httpsSolver.provider.(*TLSProviderServer).iface; got != optHost { t.Errorf("Expected tls-sni-01 to have port %s but was %s", optHost, got) } @@ -108,10 +108,10 @@ func TestClientOptPort(t *testing.T) { client.SetHTTPAddress(net.JoinHostPort(optHost, optPort)) client.SetTLSAddress(net.JoinHostPort(optHost, optPort)) - if got := httpSolver.provider.(*httpChallengeServer).iface; got != optHost { + if got := httpSolver.provider.(*HTTPProviderServer).iface; got != optHost { t.Errorf("Expected http-01 to have iface %s but was %s", optHost, got) } - if got := httpsSolver.provider.(*tlsSNIChallengeServer).port; got != optPort { + if got := httpsSolver.provider.(*TLSProviderServer).port; got != optPort { t.Errorf("Expected tls-sni-01 to have port %s but was %s", optPort, got) } } diff --git a/acme/http_challenge_test.go b/acme/http_challenge_test.go index 9c33d7d0..79b8b545 100644 --- a/acme/http_challenge_test.go +++ b/acme/http_challenge_test.go @@ -35,7 +35,7 @@ func TestHTTPChallenge(t *testing.T) { return nil } - solver := &httpChallenge{jws: j, validate: mockValidate, provider: &httpChallengeServer{port: "23457"}} + solver := &httpChallenge{jws: j, validate: mockValidate, provider: &HTTPProviderServer{port: "23457"}} if err := solver.Solve(clientChallenge, "localhost:23457"); err != nil { t.Errorf("Solve error: got %v, want nil", err) @@ -46,7 +46,7 @@ func TestHTTPChallengeInvalidPort(t *testing.T) { privKey, _ := generatePrivateKey(rsakey, 128) j := &jws{privKey: privKey.(*rsa.PrivateKey)} clientChallenge := challenge{Type: HTTP01, Token: "http2"} - solver := &httpChallenge{jws: j, validate: stubValidate, provider: &httpChallengeServer{port: "123456"}} + solver := &httpChallenge{jws: j, validate: stubValidate, provider: &HTTPProviderServer{port: "123456"}} if err := solver.Solve(clientChallenge, "localhost:123456"); err == nil { t.Errorf("Solve error: got %v, want error", err) diff --git a/acme/tls_sni_challenge_test.go b/acme/tls_sni_challenge_test.go index 3372912f..60f1498b 100644 --- a/acme/tls_sni_challenge_test.go +++ b/acme/tls_sni_challenge_test.go @@ -43,7 +43,7 @@ func TestTLSSNIChallenge(t *testing.T) { return nil } - solver := &tlsSNIChallenge{jws: j, validate: mockValidate, provider: &tlsSNIChallengeServer{port: "23457"}} + solver := &tlsSNIChallenge{jws: j, validate: mockValidate, provider: &TLSProviderServer{port: "23457"}} if err := solver.Solve(clientChallenge, "localhost:23457"); err != nil { t.Errorf("Solve error: got %v, want nil", err) @@ -54,7 +54,7 @@ func TestTLSSNIChallengeInvalidPort(t *testing.T) { privKey, _ := generatePrivateKey(rsakey, 128) j := &jws{privKey: privKey.(*rsa.PrivateKey)} clientChallenge := challenge{Type: TLSSNI01, Token: "tlssni2"} - solver := &tlsSNIChallenge{jws: j, validate: stubValidate, provider: &tlsSNIChallengeServer{port: "123456"}} + solver := &tlsSNIChallenge{jws: j, validate: stubValidate, provider: &TLSProviderServer{port: "123456"}} if err := solver.Solve(clientChallenge, "localhost:123456"); err == nil { t.Errorf("Solve error: got %v, want error", err)