refactor(netxlite): make sure we always use netxmocks (#399)
* refactor(netxlite): make sure we always use netmocks While there, improve logging and make sure we test 100% of the package with unit tests only. (We don't need to have integration testing in this package because it's fairly simple/obvious.) Part of https://github.com/ooni/probe/issues/1505 * further improve logs
This commit is contained in:
parent
c5dd9a68f1
commit
b8428b302f
8 changed files with 124 additions and 79 deletions
|
|
@ -14,7 +14,6 @@ func TestReduceErrors(t *testing.T) {
|
|||
t.Fatal("wrong result")
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("single error", func(t *testing.T) {
|
||||
err := errors.New("mocked error")
|
||||
result := ReduceErrors([]error{err})
|
||||
|
|
@ -22,7 +21,6 @@ func TestReduceErrors(t *testing.T) {
|
|||
t.Fatal("wrong result")
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("multiple errors", func(t *testing.T) {
|
||||
err1 := errors.New("mocked error #1")
|
||||
err2 := errors.New("mocked error #2")
|
||||
|
|
@ -31,7 +29,6 @@ func TestReduceErrors(t *testing.T) {
|
|||
t.Fatal("wrong result")
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("multiple errors with meaningful ones", func(t *testing.T) {
|
||||
err1 := errors.New("mocked error #1")
|
||||
err2 := &errorx.ErrWrapper{
|
||||
|
|
|
|||
Loading…
Reference in a new issue