Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
bassosimone committed Jun 6, 2024
1 parent 06d300f commit d490448
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
10 changes: 10 additions & 0 deletions internal/oonirun/experiment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
Expand Down
10 changes: 10 additions & 0 deletions internal/oonirun/v1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
Expand Down
10 changes: 10 additions & 0 deletions internal/oonirun/v2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit d490448

Please sign in to comment.