Skip to content

Commit

Permalink
Temporarily disabling shortcut and detour globally to eliminate a con…
Browse files Browse the repository at this point in the history
…founding variable when trying to determine how well service is working, especially in China
  • Loading branch information
oxtoacart committed Sep 8, 2022
1 parent 81e0fe6 commit 73b1144
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions config/features_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func TestDetour(t *testing.T) {
gl := globalFromTemplate(t)
for _, country := range []string{"cn"} {
for _, os := range []string{"android", "windows", "darwin", "linux"} {
assert.True(t, gl.FeatureEnabled(FeatureDetour, os, common.DefaultAppName, common.Version, 1, false, country), fmt.Sprintf("detour is enabled for %s in %s", os, country))
assert.False(t, gl.FeatureEnabled(FeatureDetour, os, common.DefaultAppName, common.Version, 1, false, country), fmt.Sprintf("detour is disabled for %s in %s", os, country))
}
}
}
Expand All @@ -148,7 +148,7 @@ func TestShortcut(t *testing.T) {
for _, country := range []string{"cn", "ir"} {
for _, os := range []string{"android", "windows", "darwin", "linux"} {
if country != "ir" || os != "android" {
assert.True(t, gl.FeatureEnabled(FeatureShortcut, os, common.DefaultAppName, common.Version, 1, false, country), fmt.Sprintf("shortcut is enabled for %s in %s", os, country))
assert.False(t, gl.FeatureEnabled(FeatureShortcut, os, common.DefaultAppName, common.Version, 1, false, country), fmt.Sprintf("shortcut is disabled for %s in %s", os, country))
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions config_v6/features_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func TestDetour(t *testing.T) {
gl := globalFromTemplate(t)
for _, country := range []string{"cn"} {
for _, os := range []string{"android", "windows", "darwin", "linux"} {
assert.True(t, gl.FeatureEnabled(FeatureDetour, os, common.DefaultAppName, common.Version, 1, false, country), fmt.Sprintf("detour is enabled for %s in %s", os, country))
assert.False(t, gl.FeatureEnabled(FeatureDetour, os, common.DefaultAppName, common.Version, 1, false, country), fmt.Sprintf("detour is disabled for %s in %s", os, country))
}
}
}
Expand All @@ -148,7 +148,7 @@ func TestShortcut(t *testing.T) {
for _, country := range []string{"cn", "ir"} {
for _, os := range []string{"android", "windows", "darwin", "linux"} {
if country != "ir" || os != "android" {
assert.True(t, gl.FeatureEnabled(FeatureShortcut, os, common.DefaultAppName, common.Version, 1, false, country), fmt.Sprintf("shortcut is enabled for %s in %s", os, country))
assert.False(t, gl.FeatureEnabled(FeatureShortcut, os, common.DefaultAppName, common.Version, 1, false, country), fmt.Sprintf("shortcut is disabled for %s in %s", os, country))
}
}
}
Expand Down
18 changes: 9 additions & 9 deletions embeddedconfig/global.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,15 @@ featuresenabled:
versionconstraints: ">=99.0.0"
# For building
######## New-Style configuration for detour, shortcut and probeproxies. These are disabled by default and have to be enabled in the config. ########
detour:
- label: cn-detour
geocountries: cn
shortcut:
- label: cn-shortcut
geocountries: cn
- lable: ir-desktop-shortcut
geocountries: ir
platforms: windows,darwin,linux
#detour:
# - label: cn-detour
# geocountries: cn
#shortcut:
# - label: cn-shortcut
# geocountries: cn
# - label: ir-desktop-shortcut
# geocountries: ir
# platforms: windows,darwin,linux
# probeproxies is not enabled anywhere
######## End of New-Style configuration for detour, shortcut and probeproxies ########

Expand Down

0 comments on commit 73b1144

Please sign in to comment.