refactor(netxlite): finish grouping tests (#488)
They are now more readable. I'll do another pass and start separating integration testing from unit testing. I think we need to have some always on integration testing for netxlite that runs on macOS, linux, and windows. See https://github.com/ooni/probe/issues/1591
This commit is contained in:
parent
493b72b170
commit
f2e3e5cc08
7 changed files with 1100 additions and 1088 deletions
|
|
@ -15,6 +15,7 @@ func TestQuirkReduceErrors(t *testing.T) {
|
|||
t.Fatal("wrong result")
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("single error", func(t *testing.T) {
|
||||
err := errors.New("mocked error")
|
||||
result := quirkReduceErrors([]error{err})
|
||||
|
|
@ -22,6 +23,7 @@ func TestQuirkReduceErrors(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")
|
||||
|
|
@ -30,6 +32,7 @@ func TestQuirkReduceErrors(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 := &errorsx.ErrWrapper{
|
||||
|
|
|
|||
Loading…
Reference in a new issue