diff options
author | Ethan Koenig <ethantkoenig@gmail.com> | 2017-06-09 14:13:46 -0400 |
---|---|---|
committer | Ethan Koenig <ethantkoenig@gmail.com> | 2017-06-09 15:42:48 -0400 |
commit | e9b1b908ee7c5b0722f6bce51aef4519990fae0b (patch) | |
tree | 68229bda259313f48e329be93d9c8bb566498447 /integrations/integration_test.go | |
parent | 4a3f40460bd5d6e540a72b53056f51cc61738de7 (diff) | |
download | gitea-e9b1b908ee7c5b0722f6bce51aef4519990fae0b.tar.gz gitea-e9b1b908ee7c5b0722f6bce51aef4519990fae0b.zip |
Fix setting.AppPath for integration tests
Diffstat (limited to 'integrations/integration_test.go')
-rw-r--r-- | integrations/integration_test.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/integrations/integration_test.go b/integrations/integration_test.go index 88b4614b76..a0271ce6bf 100644 --- a/integrations/integration_test.go +++ b/integrations/integration_test.go @@ -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() |