Skip to content

Commit

Permalink
Merge pull request #130 from cortexproject/fix-walk-call-test
Browse files Browse the repository at this point in the history
  • Loading branch information
yeya24 authored Nov 2, 2024
2 parents 39de2f9 + 585513b commit 4051538
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions walk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ func TestWalkCall(t *testing.T) {
}
require.True(t, slices.Contains(tc.valueTypes, c.Func.ReturnType))
for i, arg := range c.Args {
// Only happen for functions with variadic set to -1 like label_join.
// Hardcode its value to ensure it is string type.
if i >= len(c.Func.ArgTypes) {
require.Equal(t, parser.ValueTypeString, arg.Type())
continue
}
require.Equal(t, c.Func.ArgTypes[i], arg.Type())
}
})
Expand Down

0 comments on commit 4051538

Please sign in to comment.