diff options
author | Mura Li <typeless@users.noreply.github.com> | 2017-03-07 15:38:26 +0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-03-07 15:38:26 +0800 |
commit | 288226e13ca86c033d8417238dd7e1e1deb7173c (patch) | |
tree | d57b3193f377778d2b9e566ebb7cbcb9776b68b6 | |
parent | fa41ddd3ebcdd90a94bd1c56d095476604b1957c (diff) | |
download | gitea-288226e13ca86c033d8417238dd7e1e1deb7173c.tar.gz gitea-288226e13ca86c033d8417238dd7e1e1deb7173c.zip |
Fix stray directories generated by integration tests (#1134)
-rw-r--r-- | integrations/install_test.go | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/integrations/install_test.go b/integrations/install_test.go index 96d0ce1780..9912bfa901 100644 --- a/integrations/install_test.go +++ b/integrations/install_test.go @@ -9,7 +9,6 @@ import ( "net/http" "os" "os/user" - "path/filepath" "testing" "time" @@ -21,19 +20,19 @@ const ServerHTTPPort = "3001" const _RetryLimit = 10 -func makeSimpleSettings(user, workdir, port string) map[string][]string { +func makeSimpleSettings(user, port string) map[string][]string { return map[string][]string{ "db_type": {"SQLite3"}, "db_host": {"localhost"}, - "db_path": {workdir + "data/gitea.db"}, + "db_path": {"data/gitea.db"}, "app_name": {"Gitea: Git with a cup of tea"}, - "repo_root_path": {workdir + "repositories"}, + "repo_root_path": {"repositories"}, "run_user": {user}, "domain": {"localhost"}, "ssh_port": {"22"}, "http_port": {port}, "app_url": {"http://localhost:" + port}, - "log_root_path": {workdir + "log"}, + "log_root_path": {"log"}, } } @@ -65,12 +64,7 @@ func install(t *utils.T) error { return err } - path, err := filepath.Abs(t.Config.WorkDir) - if err != nil { - return err - } - - settings := makeSimpleSettings(_user.Username, path, ServerHTTPPort) + settings := makeSimpleSettings(_user.Username, ServerHTTPPort) r, err = http.PostForm("http://:"+ServerHTTPPort+"/install", settings) if err != nil { return err |