1
0
mirror of https://github.com/juanfont/headscale.git synced 2024-12-20 19:09:07 +01:00

Formatting and improving logs for config loading

This commit is contained in:
Kristoffer Dalby 2022-01-25 22:11:15 +00:00
parent 6e14fdf0d3
commit 05db1b7109
2 changed files with 6 additions and 2 deletions

View File

@ -44,7 +44,7 @@ func main() {
})
if err := cli.LoadConfig(""); err != nil {
log.Fatal().Err(err)
log.Fatal().Caller().Err(err)
}
machineOutput := cli.HasMachineOutputFlag()

View File

@ -61,7 +61,11 @@ func (*Suite) TestConfigLoading(c *check.C) {
c.Assert(viper.GetString("tls_letsencrypt_listen"), check.Equals, ":http")
c.Assert(viper.GetString("tls_letsencrypt_challenge_type"), check.Equals, "HTTP-01")
c.Assert(viper.GetStringSlice("dns_config.nameservers")[0], check.Equals, "1.1.1.1")
c.Assert(cli.GetFileMode("unix_socket_permission"), check.Equals, fs.FileMode(0o770))
c.Assert(
cli.GetFileMode("unix_socket_permission"),
check.Equals,
fs.FileMode(0o770),
)
}
func (*Suite) TestDNSConfigLoading(c *check.C) {