fix(netxlite): add error wrappers (#480)

See https://github.com/ooni/probe/issues/1591
This commit is contained in:
Simone Basso 2021-09-07 19:56:42 +02:00 committed by GitHub
commit 323266da83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 729 additions and 15 deletions

View file

@ -40,7 +40,11 @@ func TestNewTLSHandshakerUTLSTypes(t *testing.T) {
if thl.Logger != log.Log {
t.Fatal("invalid logger")
}
thc, okay := thl.TLSHandshaker.(*tlsHandshakerConfigurable)
ew, okay := thl.TLSHandshaker.(*tlsHandshakerErrWrapper)
if !okay {
t.Fatal("invalid type")
}
thc, okay := ew.TLSHandshaker.(*tlsHandshakerConfigurable)
if !okay {
t.Fatal("invalid type")
}