Skip to content

Commit

Permalink
fix: make test TestOutgoingTLSBadClientCertificate less strict
Browse files Browse the repository at this point in the history
  • Loading branch information
henvic committed Nov 2, 2023
1 parent 938aae5 commit d3bb0e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1447,7 +1447,8 @@ func TestOutgoingTLSBadClientCertificate(t *testing.T) {
}
req.Host = "example.com" // overriding the Host header to send
req.Header.Add("User-Agent", "Robot/0.1 [email protected]")
if _, err = client.Do(req); err == nil || !strings.Contains(err.Error(), "bad certificate") {
var ue = &url.Error{}
if _, err = client.Do(req); err == nil || !errors.As(err, &ue) {
t.Errorf("got: %v, expected bad certificate error message", err)
}
want := fmt.Sprintf(golden(t.Name()), ts.URL)
Expand Down

0 comments on commit d3bb0e6

Please sign in to comment.