Browse Source

Fix setting.AppPath for integration tests

for-closed-social
Ethan Koenig 7 years ago
parent
commit
e9b1b908ee
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      integrations/integration_test.go

+ 4
- 1
integrations/integration_test.go View File

@ -14,6 +14,7 @@ import (
"net/http/cookiejar"
"net/url"
"os"
"path"
"strings"
"testing"
@ -63,9 +64,11 @@ func initIntegrationTest() {
fmt.Println("Environment variable $GITEA_CONF not set")
os.Exit(1)
}
if os.Getenv("GITEA_ROOT") == "" {
if giteaRoot := os.Getenv("GITEA_ROOT"); giteaRoot == "" {
fmt.Println("Environment variable $GITEA_ROOT not set")
os.Exit(1)
} else {
setting.AppPath = path.Join(giteaRoot, "gitea")
}
setting.NewContext()

Loading…
Cancel
Save