Use more general ooni/probe-engine API (#67)
No functional change, just importing less stuff and meddling much less with the internals of ooni/probe-engine.
This commit is contained in:
parent
1b9bc457b9
commit
946289d6fe
14 changed files with 230 additions and 128 deletions
|
|
@ -4,7 +4,6 @@ import (
|
|||
"errors"
|
||||
|
||||
"github.com/ooni/probe-cli/nettests"
|
||||
"github.com/ooni/probe-engine/experiment/hirl"
|
||||
)
|
||||
|
||||
// HTTPInvalidRequestLine test implementation
|
||||
|
|
@ -13,10 +12,16 @@ type HTTPInvalidRequestLine struct {
|
|||
|
||||
// Run starts the test
|
||||
func (h HTTPInvalidRequestLine) Run(ctl *nettests.Controller) error {
|
||||
experiment := hirl.NewExperiment(ctl.Ctx.Session, hirl.Config{
|
||||
LogLevel: "INFO",
|
||||
})
|
||||
return ctl.Run(experiment, []string{""})
|
||||
builder, err := ctl.Ctx.Session.NewExperimentBuilder(
|
||||
"http_invalid_request_line",
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := builder.SetOptionString("LogLevel", "INFO"); err != nil {
|
||||
return err
|
||||
}
|
||||
return ctl.Run(builder, []string{""})
|
||||
}
|
||||
|
||||
// HTTPInvalidRequestLineTestKeys for the test
|
||||
|
|
|
|||
Loading…
Reference in a new issue