summaryrefslogtreecommitdiff
path: root/testrig/router.go
diff options
context:
space:
mode:
authorLibravatar f0x52 <f0x@cthu.lu>2022-11-02 16:31:43 +0100
committerLibravatar GitHub <noreply@github.com>2022-11-02 16:31:43 +0100
commitc4c713988a62c2ca1ea92778f2cebbfd483c98f1 (patch)
tree0e29b53992a452559f221df698fa2e1d5aa1ce1b /testrig/router.go
parent[chore] Bump CI dependencies (#944) (diff)
downloadgotosocial-c4c713988a62c2ca1ea92778f2cebbfd483c98f1.tar.xz
[frontend] change bundler to skulk (#942)
* replace web bundler with skulk * upgrade skulk * add license
Diffstat (limited to 'testrig/router.go')
-rw-r--r--testrig/router.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/testrig/router.go b/testrig/router.go
index 5ab228611..b8f6a77f5 100644
--- a/testrig/router.go
+++ b/testrig/router.go
@@ -22,6 +22,7 @@ import (
"context"
"os"
"path/filepath"
+ "strconv"
"github.com/gin-gonic/gin"
"github.com/superseriousbusiness/gotosocial/internal/config"
@@ -44,6 +45,12 @@ func NewTestRouter(db db.DB) router.Router {
config.SetBindAddress(alternativeBindAddress)
}
+ if alternativePortStr := os.Getenv("GTS_PORT"); alternativePortStr != "" {
+ if alternativePort, err := strconv.Atoi(alternativePortStr); err == nil {
+ config.SetPort(alternativePort)
+ }
+ }
+
r, err := router.New(context.Background(), db)
if err != nil {
panic(err)