Skip to content

Commit 3146d03

Browse files
authored
Fix plugin list smoke assertion (#94)
1 parent 25c290a commit 3146d03

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

test/smoke/plugin_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,13 @@ func assertPluginListed(t *testing.T, raw string, pluginID string) {
224224
t.Helper()
225225
var items []map[string]any
226226
if err := json.Unmarshal([]byte(raw), &items); err != nil {
227-
t.Fatalf("decode plugin list output: %v\nraw:\n%s", err, raw)
227+
var grouped map[string][]map[string]any
228+
if groupedErr := json.Unmarshal([]byte(raw), &grouped); groupedErr != nil {
229+
t.Fatalf("decode plugin list output: %v; grouped decode: %v\nraw:\n%s", err, groupedErr, raw)
230+
}
231+
for _, group := range grouped {
232+
items = append(items, group...)
233+
}
228234
}
229235
for _, item := range items {
230236
if item["id"] == pluginID {

0 commit comments

Comments
 (0)