Fix config unit tests

Recent changes to config and logging modules have left the tests needing
to initialize both config and logging packages. This commit updates the
config module to automatically initialize into at least useful defaults
at module load time. This commit also fixes the config unit tests by
using the more up to date interface that the package provides.

Signed-off-by: Ava Affine <ava@sunnypup.io>
This commit is contained in:
Ava Apples Affine 2024-11-14 10:27:45 -08:00
parent 00fff032c7
commit 6afd0122c9
2 changed files with 13 additions and 4 deletions

View file

@ -25,12 +25,9 @@ log_compression: false
func TestDefaultConfigs(t *testing.T) {
k := "testdefaultkey"
v := "testdefaultval"
viper.SetDefault(k, v)
_, err := Parse()
if err != nil {
if err := Init(); err != nil {
t.Error(err)
}