Skip to content

Commit

Permalink
Fix test to use assert.Len (testifylint)
Browse files Browse the repository at this point in the history
  • Loading branch information
edmocosta committed Aug 30, 2024
1 parent 0552371 commit ee02ebd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/ottl/functions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2391,7 +2391,7 @@ func Test_newPath(t *testing.T) {
assert.Equal(t, "string", p.Name())
assert.Equal(t, "body.string[key]", p.String())
assert.Nil(t, p.Next())
assert.Equal(t, 1, len(p.Keys()))
assert.Len(t, p.Keys(), 1)
v, err := p.Keys()[0].String(context.Background(), struct{}{})
assert.NoError(t, err)
assert.Equal(t, "key", *v)
Expand Down Expand Up @@ -2492,7 +2492,7 @@ func Test_newPath_WithPathContextNames(t *testing.T) {
assert.Equal(t, tt.pathContext, p.Context())
}
assert.Nil(t, p.Next())
assert.Equal(t, 1, len(p.Keys()))
assert.Len(t, p.Keys(), 1)
v, err := p.Keys()[0].String(context.Background(), struct{}{})
assert.NoError(t, err)
assert.Equal(t, "key", *v)
Expand Down Expand Up @@ -2534,7 +2534,7 @@ func Test_newKey(t *testing.T) {
}
ks := newKeys[any](keys)

assert.Equal(t, 2, len(ks))
assert.Len(t, ks, 2)

s, err := ks[0].String(context.Background(), nil)
assert.NoError(t, err)
Expand Down

0 comments on commit ee02ebd

Please sign in to comment.