Add a test for the getdnsconfig function

This commit is contained in:
Kristoffer Dalby 2021-08-25 19:03:04 +01:00
parent 3f5e06a0f8
commit 8735e5675c
No known key found for this signature in database
GPG key ID: 09F62DC067465735
2 changed files with 32 additions and 2 deletions

View file

@ -75,7 +75,7 @@ func LoadConfig(path string) error {
}
func getDNSConfig() *tailcfg.DNSConfig {
func GetDNSConfig() *tailcfg.DNSConfig {
if viper.IsSet("dns_config") {
dnsConfig := &tailcfg.DNSConfig{}
@ -168,7 +168,7 @@ func getHeadscaleApp() (*headscale.Headscale, error) {
TLSCertPath: absPath(viper.GetString("tls_cert_path")),
TLSKeyPath: absPath(viper.GetString("tls_key_path")),
DNSConfig: getDNSConfig(),
DNSConfig: GetDNSConfig(),
}
h, err := headscale.NewHeadscale(cfg)