diff --git a/internal/oonirun/experiment_test.go b/internal/oonirun/experiment_test.go index b93fd25ae..d438f47ce 100644 --- a/internal/oonirun/experiment_test.go +++ b/internal/oonirun/experiment_test.go @@ -67,6 +67,16 @@ func TestExperimentRunWithFailureToSubmitAndShuffle(t *testing.T) { } return exp }, + MockNewTargetLoader: func(config *model.ExperimentTargetLoaderConfig) model.ExperimentTargetLoader { + return &mocks.ExperimentTargetLoader{ + MockLoad: func(ctx context.Context) ([]model.ExperimentTarget, error) { + // Implementation note: the convention for input-less experiments is that + // they require a single entry containing an empty input. + entry := model.NewOOAPIURLInfoWithDefaultCategoryAndCountry("") + return []model.ExperimentTarget{entry}, nil + }, + } + }, } return eb, nil }, diff --git a/internal/oonirun/v1_test.go b/internal/oonirun/v1_test.go index c23455a9f..910d910b0 100644 --- a/internal/oonirun/v1_test.go +++ b/internal/oonirun/v1_test.go @@ -44,6 +44,16 @@ func newMinimalFakeSession() *mocks.Session { } return exp }, + MockNewTargetLoader: func(config *model.ExperimentTargetLoaderConfig) model.ExperimentTargetLoader { + return &mocks.ExperimentTargetLoader{ + MockLoad: func(ctx context.Context) ([]model.ExperimentTarget, error) { + // Implementation note: the convention for input-less experiments is that + // they require a single entry containing an empty input. + entry := model.NewOOAPIURLInfoWithDefaultCategoryAndCountry("") + return []model.ExperimentTarget{entry}, nil + }, + } + }, } return eb, nil }, diff --git a/internal/oonirun/v2_test.go b/internal/oonirun/v2_test.go index c4afa60e9..d849c6d08 100644 --- a/internal/oonirun/v2_test.go +++ b/internal/oonirun/v2_test.go @@ -392,6 +392,16 @@ func TestV2MeasureDescriptor(t *testing.T) { } return exp }, + MockNewTargetLoader: func(config *model.ExperimentTargetLoaderConfig) model.ExperimentTargetLoader { + return &mocks.ExperimentTargetLoader{ + MockLoad: func(ctx context.Context) ([]model.ExperimentTarget, error) { + // Implementation note: the convention for input-less experiments is that + // they require a single entry containing an empty input. + entry := model.NewOOAPIURLInfoWithDefaultCategoryAndCountry("") + return []model.ExperimentTarget{entry}, nil + }, + } + }, } return eb, nil }