forked from quic-go/quic-go
fix incorrect usage of errors.Is
errors.Is is supposed to used for equality of errors, not for type assertions. That's what errors.As is there for.
This commit is contained in:
@@ -371,7 +371,8 @@ var _ = Describe("MITM test", func() {
|
||||
}
|
||||
err := runTest(delayCb)
|
||||
Expect(err).To(HaveOccurred())
|
||||
Expect(err).To(MatchError(&quic.VersionNegotiationError{}))
|
||||
vnErr := &quic.VersionNegotiationError{}
|
||||
Expect(errors.As(err, &vnErr)).To(BeTrue())
|
||||
})
|
||||
|
||||
// times out, because client doesn't accept subsequent real retry packets from server
|
||||
|
||||
Reference in New Issue
Block a user