Skip to content

Commit c575c82

Browse files
Use unwrapping to acknowledge error in fingerprint unittest (#567) (#568)
Co-authored-by: Laurent Saint-Félix <[email protected]>
1 parent 631b10d commit c575c82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

elasticsearch_internal_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,7 @@ tuSVaQmm5eqgaAxMamBXSyw1lir07byemyuEDg0mJ1rNUGsAY8P+LWr579gvKMme
852852
_, err = client.Info()
853853

854854
if err.Error() != `x509: “instance” certificate is not standards compliant` {
855-
if _, ok := err.(x509.UnknownAuthorityError); !ok {
855+
if ok := errors.As(err, &x509.UnknownAuthorityError{}); !ok {
856856
t.Fatalf("Uknown error, expected UnknownAuthorityError, got: %s", err)
857857
}
858858
}

0 commit comments

Comments
 (0)