Skip to content

Commit

Permalink
fixing test error
Browse files Browse the repository at this point in the history
  • Loading branch information
gizas committed Mar 7, 2024
1 parent 3c1e817 commit 516584a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions utils/hints_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func TestGenerateHints(t *testing.T) {
annotations map[string]string
result mapstr.M
}{
Empty annotations should return empty hints
//Empty annotations should return empty hints
{
name: "test0",
annotations: map[string]string{},
Expand Down Expand Up @@ -243,12 +243,12 @@ func TestGenerateHints(t *testing.T) {
continue
}
}
generateHints, incorrecthints := GenerateHints(annMap, "foobar", "co.elastic", allSupportedHints)
generateHints, incorrectHints := GenerateHints(annMap, "foobar", "co.elastic", allSupportedHints)
//Only in test2 we have added co.elastic.hints.steam annotation with a typo error
if test.name == "test2" {
assert.Equal(t, 1, len(incorrecthints)) // We validate how many incorrect hints are provided in test1.
assert.Equal(t, 1, len(incorrectHints)) // We validate how many incorrect hints are provided in test1.
} else {
assert.Equal(t, 0, len(incorrecthints)) // We validate how many incorrect hints are provided in rest of tests
assert.Equal(t, 0, len(incorrectHints)) // We validate how many incorrect hints are provided in rest of tests
}
assert.Equal(t, test.result, generateHints)
}
Expand Down

0 comments on commit 516584a

Please sign in to comment.