9
9
"net/http"
10
10
"os"
11
11
"os/user"
12
- "path/filepath"
13
12
"testing"
14
13
"time"
15
14
@@ -21,19 +20,19 @@ const ServerHTTPPort = "3001"
21
20
22
21
const _RetryLimit = 10
23
22
24
- func makeSimpleSettings (user , workdir , port string ) map [string ][]string {
23
+ func makeSimpleSettings (user , port string ) map [string ][]string {
25
24
return map [string ][]string {
26
25
"db_type" : {"SQLite3" },
27
26
"db_host" : {"localhost" },
28
- "db_path" : {workdir + "data/gitea.db" },
27
+ "db_path" : {"data/gitea.db" },
29
28
"app_name" : {"Gitea: Git with a cup of tea" },
30
- "repo_root_path" : {workdir + "repositories" },
29
+ "repo_root_path" : {"repositories" },
31
30
"run_user" : {user },
32
31
"domain" : {"localhost" },
33
32
"ssh_port" : {"22" },
34
33
"http_port" : {port },
35
34
"app_url" : {"http://localhost:" + port },
36
- "log_root_path" : {workdir + "log" },
35
+ "log_root_path" : {"log" },
37
36
}
38
37
}
39
38
@@ -65,12 +64,7 @@ func install(t *utils.T) error {
65
64
return err
66
65
}
67
66
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 )
74
68
r , err = http .PostForm ("http://:" + ServerHTTPPort + "/install" , settings )
75
69
if err != nil {
76
70
return err
0 commit comments