Skip to content

Commit bea2b39

Browse files
alexanderbezmergify[bot]
authored andcommitted
chore: Test for Server Config Read #14125
(cherry picked from commit 9f46665)
1 parent 1ca5a01 commit bea2b39

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

server/config/config_test.go

+12
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,18 @@ prefix = ""`
5454
require.Contains(t, buffer.String(), expectedContents, "config file contents")
5555
}
5656

57+
func TestReadConfig(t *testing.T) {
58+
cfg := DefaultConfig()
59+
tmpFile := filepath.Join(t.TempDir(), "config")
60+
WriteConfigFile(tmpFile, cfg)
61+
62+
v := viper.New()
63+
otherCfg, err := GetConfig(v)
64+
require.NoError(t, err)
65+
66+
require.Equal(t, *cfg, otherCfg)
67+
}
68+
5769
func TestIndexEventsWriteRead(t *testing.T) {
5870
expected := []string{"key3", "key4"}
5971

0 commit comments

Comments
 (0)