refactor(sessionresolver): minor changes in files and types naming (#810)
Part of https://github.com/ooni/probe/issues/2135
This commit is contained in:
parent
beba543b98
commit
a02cc6100b
14 changed files with 145 additions and 107 deletions
|
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue