Skip to content

Commit

Permalink
chore: Test for Server Config Read #14125
Browse files Browse the repository at this point in the history
(cherry picked from commit 9f46665)
  • Loading branch information
alexanderbez authored and mergify[bot] committed Dec 1, 2022
1 parent 1ca5a01 commit bea2b39
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions server/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,18 @@ prefix = ""`
require.Contains(t, buffer.String(), expectedContents, "config file contents")
}

func TestReadConfig(t *testing.T) {
cfg := DefaultConfig()
tmpFile := filepath.Join(t.TempDir(), "config")
WriteConfigFile(tmpFile, cfg)

v := viper.New()
otherCfg, err := GetConfig(v)
require.NoError(t, err)

require.Equal(t, *cfg, otherCfg)
}

func TestIndexEventsWriteRead(t *testing.T) {
expected := []string{"key3", "key4"}

Expand Down

0 comments on commit bea2b39

Please sign in to comment.