From 7dc200d8879c846ee9edb2f296f6a709df8111f1 Mon Sep 17 00:00:00 2001 From: TwinProduction Date: Wed, 21 Oct 2020 21:59:44 -0400 Subject: [PATCH] Add test for when configuration file doesn't exist --- config/config_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/config/config_test.go b/config/config_test.go index e8186fd5..d8c1addb 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -291,3 +291,10 @@ services: t.Errorf("config.Security.Basic.PasswordSha512Hash should've been %s, but was %s", expectedPasswordHash, config.Security.Basic.PasswordSha512Hash) } } + +func TestLoadFileThatDoesNotExist(t *testing.T) { + err := Load("file-that-does-not-exist.yaml") + if err == nil { + t.Error("Should've returned an error, because the file specified doesn't exist") + } +}