commit 27a3c1dc564c44dd792b49caddfb1f38b6e957a2
parent b915a418115c7873913bafbc0337b6050c473d6a
Author: f0x52 <f0x@cthu.lu>
Date: Mon, 16 May 2022 15:05:44 +0200
testrig: override bind address from environment variable (#577)
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/testrig/router.go b/testrig/router.go
@@ -41,6 +41,10 @@ func NewTestRouter(db db.DB) router.Router {
viper.Set(config.Keys.WebTemplateBaseDir, alternativeTemplateBaseDir)
}
+ if alternativeBindAddress := os.Getenv("GTS_BIND_ADDRESS"); alternativeBindAddress != "" {
+ viper.Set(config.Keys.BindAddress, alternativeBindAddress)
+ }
+
r, err := router.New(context.Background(), db)
if err != nil {
panic(err)