-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenerator_test.go
65 lines (54 loc) · 1.11 KB
/
generator_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package main
import "testing"
func TestBootStrapConfig_BuildConfig(t *testing.T) {
conf := &BootStrapConfig{
Frp: &FRPConfig{
ServiceHost: "192.168.33.6",
SubDomain: "client03",
},
Docker: &DockerComposeConfig{
ImageVersion: "8",
},
}
err := conf.BuildConfig(getLocalPath("./tests"))
if err != nil {
t.Fatal(err)
}
}
func TestLoadFrpcConfig(t *testing.T) {
path := "/Users/mixmedia/Desktop/Projects/mm-chat/motors-chat/public/frpc.ini"
config, err := LoadFrpcConfig(path)
if err != nil {
t.Error(err)
t.Fail()
return
}
t.Logf("%v+", config)
}
func TestBuildMySQLConfig(t *testing.T) {
mysqlCfgPath, err := BuildMySQLConfig()
if err != nil {
t.Error(err)
t.Fail()
return
}
t.Logf(`mysql compose config file path: %s`, mysqlCfgPath)
}
func TestBuildFrpsConfig(t *testing.T) {
confPath, err := BuildFrpsConfig()
if err != nil {
t.Error(err)
t.Fail()
return
}
t.Logf(`frps compose config file path: %s`, confPath)
}
func TestBuildRedisConfig(t *testing.T) {
confPath, err := BuildRedisConfig()
if err != nil {
t.Error(err)
t.Fail()
return
}
t.Log(confPath)
}