Skip to content

Commit

Permalink
chore: Test for Server Config Read cosmos#14125
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderbez authored Dec 1, 2022
1 parent 0c65734 commit 9f46665
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 9f46665

Please sign in to comment.