From a02052fb0c7184889039bf045cb6ff4c1c0a0944 Mon Sep 17 00:00:00 2001 From: Simone Basso Date: Thu, 11 Mar 2021 19:35:22 +0100 Subject: [PATCH] chore: rename stun_reachability => stunreachability (#254) See https://github.com/ooni/probe/issues/1394 Ok @hellais @FedericoCeratto --- cmd/ooniprobe/internal/nettests/stunreachability.go | 2 +- internal/engine/allexperiments.go | 2 +- .../engine/experiment/stunreachability/stunreachability.go | 4 ++-- .../experiment/stunreachability/stunreachability_test.go | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/ooniprobe/internal/nettests/stunreachability.go b/cmd/ooniprobe/internal/nettests/stunreachability.go index 68fb40e..14aa46c 100644 --- a/cmd/ooniprobe/internal/nettests/stunreachability.go +++ b/cmd/ooniprobe/internal/nettests/stunreachability.go @@ -5,7 +5,7 @@ type STUNReachability struct{} // Run starts the nettest. func (n STUNReachability) Run(ctl *Controller) error { - builder, err := ctl.Session.NewExperimentBuilder("stun_reachability") + builder, err := ctl.Session.NewExperimentBuilder("stunreachability") if err != nil { return err } diff --git a/internal/engine/allexperiments.go b/internal/engine/allexperiments.go index c937add..5b6ebfb 100644 --- a/internal/engine/allexperiments.go +++ b/internal/engine/allexperiments.go @@ -241,7 +241,7 @@ var experimentsByName = map[string]func(*Session) *ExperimentBuilder{ } }, - "stun_reachability": func(session *Session) *ExperimentBuilder { + "stunreachability": func(session *Session) *ExperimentBuilder { return &ExperimentBuilder{ build: func(config interface{}) *Experiment { return NewExperiment(session, stunreachability.NewExperimentMeasurer( diff --git a/internal/engine/experiment/stunreachability/stunreachability.go b/internal/engine/experiment/stunreachability/stunreachability.go index 8bd2845..e538135 100644 --- a/internal/engine/experiment/stunreachability/stunreachability.go +++ b/internal/engine/experiment/stunreachability/stunreachability.go @@ -19,8 +19,8 @@ import ( ) const ( - testName = "stun_reachability" - testVersion = "0.1.0" + testName = "stunreachability" + testVersion = "0.2.0" ) // Config contains the experiment config. diff --git a/internal/engine/experiment/stunreachability/stunreachability_test.go b/internal/engine/experiment/stunreachability/stunreachability_test.go index 3f9ffc5..777bb4f 100644 --- a/internal/engine/experiment/stunreachability/stunreachability_test.go +++ b/internal/engine/experiment/stunreachability/stunreachability_test.go @@ -18,10 +18,10 @@ import ( func TestMeasurerExperimentNameVersion(t *testing.T) { measurer := stunreachability.NewExperimentMeasurer(stunreachability.Config{}) - if measurer.ExperimentName() != "stun_reachability" { + if measurer.ExperimentName() != "stunreachability" { t.Fatal("unexpected ExperimentName") } - if measurer.ExperimentVersion() != "0.1.0" { + if measurer.ExperimentVersion() != "0.2.0" { t.Fatal("unexpected ExperimentVersion") } }