Skip to content

Commit d88cfef

Browse files
committed
Remove unused return value from test util function
1 parent 8c69df4 commit d88cfef

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

pkg/streamingpromql/optimize/ast/collapse_constants_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func TestCollapseConstants(t *testing.T) {
5959

6060
for input, expected := range testCases {
6161
t.Run(input, func(t *testing.T) {
62-
_, _, result := getOutputFromASTOptimizationPassWithQueryPlan(t, ctx, input, func(prometheus.Registerer) optimize.ASTOptimizationPass {
62+
_, result := getOutputFromASTOptimizationPassWithQueryPlan(t, ctx, input, func(prometheus.Registerer) optimize.ASTOptimizationPass {
6363
return collapseConstants
6464
})
6565

pkg/streamingpromql/optimize/ast/prune_toggles_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func TestPruneToggles(t *testing.T) {
6464
expectedExpr, err := parser.ParseExpr(expected)
6565
require.NoError(t, err)
6666

67-
reg, _, outputExpr := getOutputFromASTOptimizationPassWithQueryPlan(t, ctx, input, func(reg prometheus.Registerer) optimize.ASTOptimizationPass {
67+
reg, outputExpr := getOutputFromASTOptimizationPassWithQueryPlan(t, ctx, input, func(reg prometheus.Registerer) optimize.ASTOptimizationPass {
6868
return ast.NewPruneToggles(reg)
6969
})
7070

pkg/streamingpromql/optimize/ast/sort_labels_and_matchers_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func TestSortLabelsAndMatchers_AggregateAndBinaryExpressions(t *testing.T) {
6464

6565
for input, expected := range testCases {
6666
t.Run(input, func(t *testing.T) {
67-
_, _, result := getOutputFromASTOptimizationPassWithQueryPlan(t, ctx, input, func(prometheus.Registerer) optimize.ASTOptimizationPass {
67+
_, result := getOutputFromASTOptimizationPassWithQueryPlan(t, ctx, input, func(prometheus.Registerer) optimize.ASTOptimizationPass {
6868
return sortLabelsAndMatchers
6969
})
7070

@@ -161,7 +161,7 @@ func TestSortLabelsAndMatchers_Selectors(t *testing.T) {
161161
sortLabelsAndMatchers := &ast.SortLabelsAndMatchers{}
162162

163163
run := func(t *testing.T, input string, expected parser.Expr) {
164-
_, _, result := getOutputFromASTOptimizationPassWithQueryPlan(t, ctx, input, func(prometheus.Registerer) optimize.ASTOptimizationPass {
164+
_, result := getOutputFromASTOptimizationPassWithQueryPlan(t, ctx, input, func(prometheus.Registerer) optimize.ASTOptimizationPass {
165165
return sortLabelsAndMatchers
166166
})
167167

pkg/streamingpromql/optimize/ast/util_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func preprocessQuery(t *testing.T, expr parser.Expr) (parser.Expr, error) {
2828
return promql.PreprocessExpr(expr, timestamp.Time(dummyTimeRange.StartT), timestamp.Time(dummyTimeRange.EndT), 0)
2929
}
3030

31-
func getOutputFromASTOptimizationPassWithQueryPlan(t *testing.T, ctx context.Context, input string, createOptimizerFunc func(prometheus.Registerer) optimize.ASTOptimizationPass) (*prometheus.Registry, optimize.ASTOptimizationPass, parser.Expr) {
31+
func getOutputFromASTOptimizationPassWithQueryPlan(t *testing.T, ctx context.Context, input string, createOptimizerFunc func(prometheus.Registerer) optimize.ASTOptimizationPass) (*prometheus.Registry, parser.Expr) {
3232
dummyTimeRange := types.NewInstantQueryTimeRange(timestamp.Time(1000))
3333
reg := prometheus.NewPedanticRegistry()
3434
opts := streamingpromql.NewTestEngineOpts()
@@ -40,7 +40,7 @@ func getOutputFromASTOptimizationPassWithQueryPlan(t *testing.T, ctx context.Con
4040
observer := streamingpromql.NoopPlanningObserver{}
4141
outputExpr, err := planner.ParseAndApplyASTOptimizationPasses(ctx, input, dummyTimeRange, observer)
4242
require.NoError(t, err)
43-
return reg, optimizer, outputExpr
43+
return reg, outputExpr
4444
}
4545

4646
func testASTOptimizationPassWithData(t *testing.T, loadTemplate string, testCases map[string]string) {

0 commit comments

Comments
 (0)