refactor: remove model.ExperimentOrchestraClient (#284)
* ongoing * while there, make sure we test everything * reorganize previous commit * ensure we have reasonable coverage in session The code in here would be better with unit tests. We have too many integration tests and the tests overall are too slow. But it's also true that I should not write a giant diff as part of this PR.
This commit is contained in:
@@ -5,29 +5,14 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ExperimentOrchestraClient is the experiment's view of
|
||||
// a client for querying the OONI orchestra API.
|
||||
type ExperimentOrchestraClient interface {
|
||||
// CheckIn calls the check-in API.
|
||||
CheckIn(ctx context.Context, config CheckInConfig) (*CheckInInfo, error)
|
||||
|
||||
// FetchPsiphonConfig returns psiphon config from the API.
|
||||
FetchPsiphonConfig(ctx context.Context) ([]byte, error)
|
||||
|
||||
// FetchTorTargets returns tor targets from the API.
|
||||
FetchTorTargets(ctx context.Context, cc string) (map[string]TorTarget, error)
|
||||
|
||||
// FetchURLList returns URLs from the API.
|
||||
// This method is deprecated and will be removed soon.
|
||||
FetchURLList(ctx context.Context, config URLListConfig) ([]URLInfo, error)
|
||||
}
|
||||
|
||||
// ExperimentSession is the experiment's view of a session.
|
||||
type ExperimentSession interface {
|
||||
GetTestHelpersByName(name string) ([]Service, bool)
|
||||
DefaultHTTPClient() *http.Client
|
||||
FetchPsiphonConfig(ctx context.Context) ([]byte, error)
|
||||
FetchTorTargets(ctx context.Context, cc string) (map[string]TorTarget, error)
|
||||
FetchURLList(ctx context.Context, config URLListConfig) ([]URLInfo, error)
|
||||
Logger() Logger
|
||||
NewOrchestraClient(ctx context.Context) (ExperimentOrchestraClient, error)
|
||||
ProbeCC() string
|
||||
ResolverIP() string
|
||||
TempDir() string
|
||||
|
||||
Reference in New Issue
Block a user