Skip to content

Commit

Permalink
chore: Test for Server Config Read #14125 (#14127)
Browse files Browse the repository at this point in the history
(cherry picked from commit 9f46665)

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
  • Loading branch information
mergify[bot] and alexanderbez committed Dec 1, 2022
1 parent 85d6f66 commit 6e5e302
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions server/config/config_test.go
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 6e5e302

Please sign in to comment.