ooni-probe-cli/internal/model/mocks/submitter.go
Simone Basso d0da224a2a
feat(oonirun): improve tests (#915)
See https://github.com/ooni/probe/issues/2184

While there, rename `runtimex.PanicIfFalse` to `runtimex.Assert` (it was about time...)
2022-08-31 18:40:27 +02:00

18 lines
351 B
Go

package mocks
import (
"context"
"github.com/ooni/probe-cli/v3/internal/model"
)
// Submitter mocks model.Submitter.
type Submitter struct {
MockSubmit func(ctx context.Context, m *model.Measurement) error
}
// Submit calls MockSubmit
func (s *Submitter) Submit(ctx context.Context, m *model.Measurement) error {
return s.MockSubmit(ctx, m)
}