From cab828c9d49dfa2fdf8c94e9156719befd2b58f6 Mon Sep 17 00:00:00 2001 From: Juan Font Alonso Date: Sun, 14 Aug 2022 16:52:57 +0200 Subject: [PATCH] Fixed unit tests to load config --- cmd/headscale/headscale_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/headscale/headscale_test.go b/cmd/headscale/headscale_test.go index 917ae432..b0667f78 100644 --- a/cmd/headscale/headscale_test.go +++ b/cmd/headscale/headscale_test.go @@ -165,7 +165,7 @@ func (*Suite) TestTLSConfigValidation(c *check.C) { // defer os.RemoveAll(tmpDir) configYaml := []byte( - "---\ntls_letsencrypt_hostname: \"example.com\"\ntls_letsencrypt_challenge_type: \"\"\ntls_cert_path: \"abc.pem\"", + "---\nnoise_private_key_path: \"noise_private.key\"\ntls_letsencrypt_hostname: \"example.com\"\ntls_letsencrypt_challenge_type: \"\"\ntls_cert_path: \"abc.pem\"\n", ) writeConfig(c, tmpDir, configYaml) @@ -192,7 +192,7 @@ func (*Suite) TestTLSConfigValidation(c *check.C) { // Check configuration validation errors (2) configYaml = []byte( - "---\nserver_url: \"http://127.0.0.1:8080\"\ntls_letsencrypt_hostname: \"example.com\"\ntls_letsencrypt_challenge_type: \"TLS-ALPN-01\"", + "---\nnoise_private_key_path: \"noise_private.key\"\nserver_url: \"http://127.0.0.1:8080\"\ntls_letsencrypt_hostname: \"example.com\"\ntls_letsencrypt_challenge_type: \"TLS-ALPN-01\"", ) writeConfig(c, tmpDir, configYaml) err = headscale.LoadConfig(tmpDir, false)