refactor: introduce and use InputOrStaticDefault (#632)
This commit introduces a new `InputLoader` policy by which, if no input is provided, we use a static default input list. We also modify the code to use this policy for dnscheck and stunreachability, with proper input. We also modify `miniooni` to pass the new `ExperimentName` field to the `InputLoader` to indicate which default input list to use. This diff is part of a set of diffs aiming at fixing https://github.com/ooni/probe/issues/1814 and has been extracted from https://github.com/ooni/probe-cli/pull/539. What remains to be done, after this diff has landed is to ensure things also work for ooniprobe and oonimkall.
This commit is contained in:
parent
13414e0abc
commit
2044b78a5a
5 changed files with 296 additions and 6 deletions
|
|
@ -49,7 +49,7 @@ var experimentsByName = map[string]func(*Session) *ExperimentBuilder{
|
|||
))
|
||||
},
|
||||
config: &dnscheck.Config{},
|
||||
inputPolicy: InputStrictlyRequired,
|
||||
inputPolicy: InputOrStaticDefault,
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -198,7 +198,7 @@ var experimentsByName = map[string]func(*Session) *ExperimentBuilder{
|
|||
))
|
||||
},
|
||||
config: &stunreachability.Config{},
|
||||
inputPolicy: InputStrictlyRequired,
|
||||
inputPolicy: InputOrStaticDefault,
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue