Skip to content

Commit

Permalink
Updating tests to avoid sorting of mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
gizas committed Aug 22, 2023
1 parent 9904bab commit 21d095b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/pkg/composable/providers/kubernetes/hints_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,8 @@ func TestGenerateHintsMappingWithProcessors(t *testing.T) {
hintData := GetHintsMapping(mapping, logger, "co.elastic", "asdfghjkl")

assert.Equal(t, expected_hints, hintData.composableMapping)
assert.Equal(t, expected_procesors, hintData.processors)
//assert.Equal(t, expected_procesors, hintData.processors). We replace this assertion with assert.Contains in order to avoid flakiness in tests because map keys are not sorted
assert.Contains(t, expected_procesors, hintData.processors[0])
assert.Contains(t, expected_procesors, hintData.processors[1])

}

0 comments on commit 21d095b

Please sign in to comment.