Skip to content

Commit 7f06e7f

Browse files
Use unwrapping to acknowledge error in fingerprint unittest (#567) (#569)
Co-authored-by: Laurent Saint-Félix <laurent.saintfelix@elastic.co>
1 parent 04c3db5 commit 7f06e7f

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
@@ -600,7 +600,7 @@ tuSVaQmm5eqgaAxMamBXSyw1lir07byemyuEDg0mJ1rNUGsAY8P+LWr579gvKMme
600600
_, err = client.Info()
601601

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

0 commit comments

Comments
 (0)