mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-11-22 03:36:39 +00:00
testrig: override bind address from environment variable (#577)
This commit is contained in:
parent
b915a41811
commit
27a3c1dc56
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue