Skip to content

Commit

Permalink
Use elements match for arrays in op func tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gordon-klotho committed Sep 19, 2023
1 parent 6f0b596 commit 6bb4baf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/knowledge_base/operational_funcs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,12 @@ func TestConfigTemplateContext_ExecuteDecode(t *testing.T) {
if !assert.NoError(err) {
return
}
assert.Equal(tt.want, gotV.Elem().Interface())
switch want := tt.want.(type) {
case []construct.ResourceId:
assert.ElementsMatch(want, gotV.Elem().Interface())
default:
assert.Equal(want, gotV.Elem().Interface())
}
})
}
}

0 comments on commit 6bb4baf

Please sign in to comment.