Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use example.org rather than example.com #1040

Merged
merged 2 commits into from
Nov 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions allexperiments.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,7 @@ var experimentsByName = map[string]func(*Session) *ExperimentBuilder{
*config.(*sniblocking.Config),
))
},
config: &sniblocking.Config{
ControlSNI: "example.com",
},
config: &sniblocking.Config{},
inputPolicy: InputRequired,
}
},
Expand Down
4 changes: 2 additions & 2 deletions experiment/httphostheader/httphostheader.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

const (
testName = "http_host_header"
testVersion = "0.1.0"
testVersion = "0.2.0"
)

// Config contains the experiment config.
Expand Down Expand Up @@ -56,7 +56,7 @@ func (m *Measurer) Run(
return errors.New("experiment requires input")
}
if m.config.TestHelperURL == "" {
m.config.TestHelperURL = "http://www.example.com"
m.config.TestHelperURL = "http://www.example.org"
}
urlgetter.RegisterExtensions(measurement)
g := urlgetter.Getter{
Expand Down
2 changes: 1 addition & 1 deletion experiment/httphostheader/httphostheader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestNewExperimentMeasurer(t *testing.T) {
if measurer.ExperimentName() != "http_host_header" {
t.Fatal("unexpected name")
}
if measurer.ExperimentVersion() != "0.1.0" {
if measurer.ExperimentVersion() != "0.2.0" {
t.Fatal("unexpected version")
}
}
Expand Down
4 changes: 2 additions & 2 deletions experiment/sniblocking/sniblocking.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

const (
testName = "sni_blocking"
testVersion = "0.1.0"
testVersion = "0.2.0"
)

// Config contains the experiment config.
Expand Down Expand Up @@ -245,7 +245,7 @@ func (m *Measurer) Run(
}
m.mu.Unlock()
if m.config.ControlSNI == "" {
return errors.New("Experiment requires ControlSNI")
m.config.ControlSNI = "example.org"
}
if measurement.Input == "" {
return errors.New("Experiment requires measurement.Input")
Expand Down
15 changes: 1 addition & 14 deletions experiment/sniblocking/sniblocking_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,24 +105,11 @@ func TestNewExperimentMeasurer(t *testing.T) {
if measurer.ExperimentName() != "sni_blocking" {
t.Fatal("unexpected name")
}
if measurer.ExperimentVersion() != "0.1.0" {
if measurer.ExperimentVersion() != "0.2.0" {
t.Fatal("unexpected version")
}
}

func TestMeasurerMeasureNoControlSNI(t *testing.T) {
measurer := NewExperimentMeasurer(Config{})
err := measurer.Run(
context.Background(),
newsession(),
new(model.Measurement),
model.NewPrinterCallbacks(log.Log),
)
if err.Error() != "Experiment requires ControlSNI" {
t.Fatal("not the error we expected")
}
}

func TestMeasurerMeasureNoMeasurementInput(t *testing.T) {
measurer := NewExperimentMeasurer(Config{
ControlSNI: "example.com",
Expand Down