feat: add a simple dnsping experiment (#674)
See https://github.com/ooni/probe/issues/1987 (issue). See https://github.com/ooni/spec/pull/238 (impl). While there, fix the build for go1.18 by adding go1.18 specific tests. I was increasingly bothered by the build being red.
This commit is contained in:
parent
a7a6d7df7f
commit
36ca28d673
6 changed files with 855 additions and 14 deletions
|
|
@ -5,6 +5,7 @@ import (
|
|||
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/experiment/dash"
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/experiment/dnscheck"
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/experiment/dnsping"
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/experiment/example"
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/experiment/fbmessenger"
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/experiment/hhfm"
|
||||
|
|
@ -57,6 +58,18 @@ var experimentsByName = map[string]func(*Session) *ExperimentBuilder{
|
|||
}
|
||||
},
|
||||
|
||||
"dnsping": func(session *Session) *ExperimentBuilder {
|
||||
return &ExperimentBuilder{
|
||||
build: func(config interface{}) *Experiment {
|
||||
return NewExperiment(session, dnsping.NewExperimentMeasurer(
|
||||
*config.(*dnsping.Config),
|
||||
))
|
||||
},
|
||||
config: &dnsping.Config{},
|
||||
inputPolicy: InputOrStaticDefault,
|
||||
}
|
||||
},
|
||||
|
||||
"example": func(session *Session) *ExperimentBuilder {
|
||||
return &ExperimentBuilder{
|
||||
build: func(config interface{}) *Experiment {
|
||||
|
|
|
|||
Loading…
Reference in a new issue