refactor(sessionresolver): minor changes in files and types naming (#810)

Part of https://github.com/ooni/probe/issues/2135
This commit is contained in:
Simone Basso 2022-06-08 22:01:51 +02:00 committed by GitHub
commit a02cc6100b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 145 additions and 107 deletions

View file

@ -9,10 +9,7 @@ import (
)
func TestErrWrapper(t *testing.T) {
ew := &errwrapper{
error: io.EOF,
URL: "https://dns.quad9.net/dns-query",
}
ew := newErrWrapper(io.EOF, "https://dns.quad9.net/dns-query")
o := ew.Error()
expect := "<https://dns.quad9.net/dns-query> EOF"
if diff := cmp.Diff(expect, o); diff != "" {
@ -21,4 +18,7 @@ func TestErrWrapper(t *testing.T) {
if !errors.Is(ew, io.EOF) {
t.Fatal("not the sub-error we expected")
}
if errors.Unwrap(ew) != io.EOF {
t.Fatal("unwrap failed")
}
}