forked from TrueCloudLab/lego
Fix tests for new naming.
This commit is contained in:
parent
21de29e902
commit
a44384f52f
3 changed files with 10 additions and 10 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue