diff --git a/cmd/ooniprobe/internal/nettests/groups.go b/cmd/ooniprobe/internal/nettests/groups.go index 2390432..7979714 100644 --- a/cmd/ooniprobe/internal/nettests/groups.go +++ b/cmd/ooniprobe/internal/nettests/groups.go @@ -55,6 +55,7 @@ var All = map[string]Group{ Nettests: []Nettest{ DNSCheck{}, STUNReachability{}, + TorSf{}, }, }, } diff --git a/cmd/ooniprobe/internal/nettests/torsf.go b/cmd/ooniprobe/internal/nettests/torsf.go new file mode 100644 index 0000000..d488188 --- /dev/null +++ b/cmd/ooniprobe/internal/nettests/torsf.go @@ -0,0 +1,14 @@ +package nettests + +// TorSf test implementation +type TorSf struct { +} + +// Run starts the test +func (h TorSf) Run(ctl *Controller) error { + builder, err := ctl.Session.NewExperimentBuilder("torsf") + if err != nil { + return err + } + return ctl.Run(builder, []string{""}) +} diff --git a/internal/engine/experiment/torsf/torsf.go b/internal/engine/experiment/torsf/torsf.go index cc8d2c5..e850953 100644 --- a/internal/engine/experiment/torsf/torsf.go +++ b/internal/engine/experiment/torsf/torsf.go @@ -173,5 +173,5 @@ type SummaryKeys struct { // GetSummaryKeys implements model.ExperimentMeasurer.GetSummaryKeys. func (m *Measurer) GetSummaryKeys(measurement *model.Measurement) (interface{}, error) { - return &SummaryKeys{IsAnomaly: false}, nil + return SummaryKeys{IsAnomaly: false}, nil } diff --git a/internal/engine/experiment/torsf/torsf_test.go b/internal/engine/experiment/torsf/torsf_test.go index 49e205a..f6d198b 100644 --- a/internal/engine/experiment/torsf/torsf_test.go +++ b/internal/engine/experiment/torsf/torsf_test.go @@ -160,7 +160,7 @@ func TestGetSummaryKeys(t *testing.T) { if err != nil { t.Fatal(err) } - rsk := sk.(*SummaryKeys) + rsk := sk.(SummaryKeys) if rsk.IsAnomaly { t.Fatal("expected no anomaly here") }