mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-12-25 00:20:32 +00:00
testrig: override bind address from environment variable (#577)
This commit is contained in:
parent
b915a41811
commit
27a3c1dc56
1 changed files with 4 additions and 0 deletions
|
@ -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