refactor: make measurex depend on measurexlite (#892)

This diff makes `measurex` depend on `measurexlite` rather than the other way around.

While there, add unit tests.

Closes https://github.com/ooni/probe/issues/2240
This commit is contained in:
Simone Basso 2022-08-28 21:41:58 +02:00 committed by GitHub
commit 8ca7645026
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 312 additions and 71 deletions

View file

@ -72,6 +72,9 @@ func NewTCPConnectList(begin time.Time, events []Event) (out []TCPConnectEntry)
return
}
// TODO(bassosimone): can we use measurexlite.NewFailure here? Do we need to have
// a string (as opposed to *string) representation of failures here?
// NewFailure creates a failure nullable string from the given error. This function
// is equivalent to NewFailureStr(err).ToFailure().
func NewFailure(err error) *string {