forked from TrueCloudLab/lego
Fix HTTP-01 and TLS-SNI invalid port tests for go 1.8
This commit is contained in:
parent
2abbe6d836
commit
3db48c9e13
2 changed files with 2 additions and 2 deletions
|
@ -51,7 +51,7 @@ func TestHTTPChallengeInvalidPort(t *testing.T) {
|
|||
|
||||
if err := solver.Solve(clientChallenge, "localhost:123456"); err == nil {
|
||||
t.Errorf("Solve error: got %v, want error", err)
|
||||
} else if want := "invalid port 123456"; !strings.HasSuffix(err.Error(), want) {
|
||||
} else if want, want18 := "invalid port 123456", "123456: invalid port"; !strings.HasSuffix(err.Error(), want) && !strings.HasSuffix(err.Error(), want18) {
|
||||
t.Errorf("Solve error: got %q, want suffix %q", err.Error(), want)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ func TestTLSSNIChallengeInvalidPort(t *testing.T) {
|
|||
|
||||
if err := solver.Solve(clientChallenge, "localhost:123456"); err == nil {
|
||||
t.Errorf("Solve error: got %v, want error", err)
|
||||
} else if want := "invalid port 123456"; !strings.HasSuffix(err.Error(), want) {
|
||||
} else if want, want18 := "invalid port 123456", "123456: invalid port"; !strings.HasSuffix(err.Error(), want) && !strings.HasSuffix(err.Error(), want18) {
|
||||
t.Errorf("Solve error: got %q, want suffix %q", err.Error(), want)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue