Always include the country code and drop include_probe_cc setting
Fixes: https://github.com/ooni/probe/issues/1183
This commit is contained in:
@@ -28,10 +28,6 @@ func TestParseConfig(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
if config.Sharing.IncludeCountry == false {
|
||||
t.Error("country should be included")
|
||||
}
|
||||
}
|
||||
|
||||
func TestUpdateConfig(t *testing.T) {
|
||||
@@ -61,7 +57,6 @@ func TestUpdateConfig(t *testing.T) {
|
||||
}
|
||||
origIncludeIP := config.Sharing.IncludeIP
|
||||
origIncludeASN := config.Sharing.IncludeASN
|
||||
origIncludeCountry := config.Sharing.IncludeCountry
|
||||
origUploadResults := config.Sharing.UploadResults
|
||||
origInformedConsent := config.InformedConsent
|
||||
if err != nil {
|
||||
@@ -87,9 +82,6 @@ func TestUpdateConfig(t *testing.T) {
|
||||
if newConfig.Sharing.IncludeASN != origIncludeASN {
|
||||
t.Error("includeASN differs")
|
||||
}
|
||||
if newConfig.Sharing.IncludeCountry != origIncludeCountry {
|
||||
t.Error("includeCountry differs")
|
||||
}
|
||||
if newConfig.Sharing.UploadResults != origUploadResults {
|
||||
t.Error("UploadResults differs")
|
||||
}
|
||||
|
||||
@@ -37,7 +37,6 @@ var websiteCategories = []string{
|
||||
type Sharing struct {
|
||||
IncludeIP bool `json:"include_ip"`
|
||||
IncludeASN bool `json:"include_asn"`
|
||||
IncludeCountry bool `json:"include_country"`
|
||||
UploadResults bool `json:"upload_results"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user