Files
ddns-go/config/config_test.go
jeessy2 3006d8887d new
2020-08-26 23:56:01 +08:00

22 lines
308 B
Go

package config
import (
"io/ioutil"
"testing"
"gopkg.in/yaml.v2"
)
func TestConfig(t *testing.T) {
conf := &Config{}
byt, err := ioutil.ReadFile("../config.yaml")
if err != nil {
t.Error(err)
}
yaml.Unmarshal(byt, conf)
if "alidns" != conf.DNS.Name {
t.Error("DNS Name必须为alidns")
}
}