diff options
Diffstat (limited to 'testrig/config.go')
| -rw-r--r-- | testrig/config.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/testrig/config.go b/testrig/config.go index ec7b72faa..b2a073a1f 100644 --- a/testrig/config.go +++ b/testrig/config.go @@ -170,6 +170,7 @@ func testDefaults() config.Configuration { AdvancedRateLimitRequests: 0, // disabled AdvancedThrottlingMultiplier: 0, // disabled AdvancedSenderMultiplier: 0, // 1 sender only, regardless of CPU + AdvancedScraperDeterrence: envBool("GTS_ADVANCED_SCRAPER_DETERRENCE", false), SoftwareVersion: "0.0.0-testrig", @@ -178,6 +179,13 @@ func testDefaults() config.Configuration { } } +func envBool(key string, _default bool) bool { + return env(key, _default, func(value string) bool { + b, _ := strconv.ParseBool(value) + return b + }) +} + func envInt(key string, _default int) int { return env(key, _default, func(value string) int { i, _ := strconv.Atoi(value) |
