fix test bug
This commit is contained in:
parent
243bd9fee4
commit
0692fe6093
1 changed files with 6 additions and 1 deletions
|
|
@ -18,9 +18,14 @@ func TestNewConfig(t *testing.T) {
|
|||
return false
|
||||
}
|
||||
|
||||
xiangPath := os.Getenv("XIANG_PATH")
|
||||
if xiangPath == "" {
|
||||
xiangPath = "bin://xiang"
|
||||
}
|
||||
|
||||
assert.Equal(t, cfg.Mode, os.Getenv("XIANG_MODE"))
|
||||
assert.Equal(t, cfg.Root, os.Getenv("XIANG_ROOT"))
|
||||
assert.Equal(t, cfg.Path, os.Getenv("XIANG_PATH"))
|
||||
assert.Equal(t, cfg.Path, xiangPath)
|
||||
|
||||
assert.Equal(t, cfg.Service.Debug, vBool(os.Getenv("XIANG_SERVICE_DEBUG")))
|
||||
assert.Equal(t, strings.Join(cfg.Service.Allow, "|"), os.Getenv("XIANG_SERVICE_ALLOW"))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue