Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix stray directories generated by integration tests #1134

Merged
merged 1 commit into from
Mar 7, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions integrations/install_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"net/http"
"os"
"os/user"
"path/filepath"
"testing"
"time"

Expand All @@ -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"},
}
}

Expand Down Expand Up @@ -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
Expand Down