mirror of
https://github.com/TwiN/gatus.git
synced 2025-06-20 09:47:55 +02:00
Add test for when configuration file doesn't exist
This commit is contained in:
parent
a32d98ab96
commit
7dc200d887
@ -291,3 +291,10 @@ services:
|
|||||||
t.Errorf("config.Security.Basic.PasswordSha512Hash should've been %s, but was %s", expectedPasswordHash, config.Security.Basic.PasswordSha512Hash)
|
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")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user