mirror of
1
Fork 0

testrig: override bind address from environment variable (#577)

This commit is contained in:
f0x52 2022-05-16 15:05:44 +02:00 committed by GitHub
parent b915a41811
commit 27a3c1dc56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -41,6 +41,10 @@ func NewTestRouter(db db.DB) router.Router {
viper.Set(config.Keys.WebTemplateBaseDir, alternativeTemplateBaseDir) 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) r, err := router.New(context.Background(), db)
if err != nil { if err != nil {
panic(err) panic(err)