overflow_service_websocket/config/config_test.go
crusader 0d428d20c0 ing
2017-07-14 20:18:07 +09:00

23 lines
308 B
Go

package config
import (
"log"
"os"
"path/filepath"
"testing"
)
func TestLoadConfig(t *testing.T) {
os.Chdir("../")
wd, _ := os.Getwd()
path := filepath.Join(wd, "config.json")
err := InitConfig(path)
if nil != err {
log.Fatalln("Config error")
}
c := GetConfig()
log.Println(c.Server.Ip)
}