mirror of
https://github.com/jeessy2/ddns-go.git
synced 2025-10-20 15:33:46 +08:00
22 lines
308 B
Go
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")
|
|
}
|
|
}
|