chore: Test for Server Config Read #14125
This commit is contained in:
parent
0c65734bbe
commit
9f46665d93
@ -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"}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user