Skip to content

Commit 288226e

Browse files
typelesslunny
authored andcommitted
Fix stray directories generated by integration tests (#1134)
1 parent fa41ddd commit 288226e

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

integrations/install_test.go

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
"net/http"
1010
"os"
1111
"os/user"
12-
"path/filepath"
1312
"testing"
1413
"time"
1514

@@ -21,19 +20,19 @@ const ServerHTTPPort = "3001"
2120

2221
const _RetryLimit = 10
2322

24-
func makeSimpleSettings(user, workdir, port string) map[string][]string {
23+
func makeSimpleSettings(user, port string) map[string][]string {
2524
return map[string][]string{
2625
"db_type": {"SQLite3"},
2726
"db_host": {"localhost"},
28-
"db_path": {workdir + "data/gitea.db"},
27+
"db_path": {"data/gitea.db"},
2928
"app_name": {"Gitea: Git with a cup of tea"},
30-
"repo_root_path": {workdir + "repositories"},
29+
"repo_root_path": {"repositories"},
3130
"run_user": {user},
3231
"domain": {"localhost"},
3332
"ssh_port": {"22"},
3433
"http_port": {port},
3534
"app_url": {"http://localhost:" + port},
36-
"log_root_path": {workdir + "log"},
35+
"log_root_path": {"log"},
3736
}
3837
}
3938

@@ -65,12 +64,7 @@ func install(t *utils.T) error {
6564
return err
6665
}
6766

68-
path, err := filepath.Abs(t.Config.WorkDir)
69-
if err != nil {
70-
return err
71-
}
72-
73-
settings := makeSimpleSettings(_user.Username, path, ServerHTTPPort)
67+
settings := makeSimpleSettings(_user.Username, ServerHTTPPort)
7468
r, err = http.PostForm("http://:"+ServerHTTPPort+"/install", settings)
7569
if err != nil {
7670
return err

0 commit comments

Comments
 (0)