]> source.dussan.org Git - gitea.git/commitdiff
Fix setting.AppPath for integration tests
authorEthan Koenig <ethantkoenig@gmail.com>
Fri, 9 Jun 2017 18:13:46 +0000 (14:13 -0400)
committerEthan Koenig <ethantkoenig@gmail.com>
Fri, 9 Jun 2017 19:42:48 +0000 (15:42 -0400)
integrations/integration_test.go

index 88b4614b7621b63799967cbc3b50233447dfd90c..a0271ce6bf6fa59f8cd006c9f5136b49b9d453f2 100644 (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()