Skip to content

Commit

Permalink
Fix playlist dual writing integration tests for mode 0
Browse files Browse the repository at this point in the history
  • Loading branch information
suntala committed May 31, 2024
1 parent 9e9dda2 commit df579f3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/tests/testinfra/testinfra.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,11 +386,13 @@ func CreateGrafDir(t *testing.T, opts ...GrafanaOpts) (string, string) {
require.NoError(t, err)
}

if o.DualWriterDesiredModes != nil && o.DualWriterDesiredModes["playlist"] != grafanarest.Mode0 {
if o.DualWriterDesiredModes != nil {
unifiedStorageMode, err := getOrCreateSection("unified_storage_mode")
require.NoError(t, err)
_, err = unifiedStorageMode.NewKey("playlist", fmt.Sprint(o.DualWriterDesiredModes["playlist"]))
require.NoError(t, err)
for k, v := range o.DualWriterDesiredModes {
_, err = unifiedStorageMode.NewKey(k, fmt.Sprint(v))
require.NoError(t, err)
}
}
}
logSection, err := getOrCreateSection("database")
Expand Down

0 comments on commit df579f3

Please sign in to comment.