config: don't log a warning if the config file is not found

we also support configuration via env vars
This commit is contained in:
Nicola Murino
2021-01-03 17:57:07 +01:00
parent 173c1820e1
commit c3410a3d91
2 changed files with 19 additions and 2 deletions

View File

@@ -58,6 +58,14 @@ func TestLoadConfigTest(t *testing.T) {
assert.NoError(t, err)
}
func TestLoadConfigFileNotFound(t *testing.T) {
reset()
viper.SetConfigName("configfile")
err := config.LoadConfig(os.TempDir(), "")
assert.NoError(t, err)
}
func TestEmptyBanner(t *testing.T) {
reset()