From 27a3c1dc564c44dd792b49caddfb1f38b6e957a2 Mon Sep 17 00:00:00 2001 From: f0x52 Date: Mon, 16 May 2022 15:05:44 +0200 Subject: [PATCH] testrig: override bind address from environment variable (#577) --- testrig/router.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/testrig/router.go b/testrig/router.go index 0064ce39..468b468c 100644 --- 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)