Sql Expressions: (Chore) Dedicated logger for expr.sql, and pass context (#109549)
This commit is contained in:
@@ -18,7 +18,7 @@ import (
|
||||
)
|
||||
|
||||
func TestNewCommand(t *testing.T) {
|
||||
cmd, err := NewSQLCommand("a", "", "select a from foo, bar", 0, 0, 0)
|
||||
cmd, err := NewSQLCommand(t.Context(), "a", "", "select a from foo, bar", 0, 0, 0)
|
||||
if err != nil && strings.Contains(err.Error(), "feature is not enabled") {
|
||||
return
|
||||
}
|
||||
@@ -126,7 +126,7 @@ func TestSQLCommandCellLimits(t *testing.T) {
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
cmd, err := NewSQLCommand("a", "", "select a from foo, bar", tt.limit, 0, 0)
|
||||
cmd, err := NewSQLCommand(t.Context(), "a", "", "select a from foo, bar", tt.limit, 0, 0)
|
||||
require.NoError(t, err, "Failed to create SQL command")
|
||||
|
||||
vars := mathexp.Vars{}
|
||||
@@ -154,7 +154,7 @@ func TestSQLCommandMetrics(t *testing.T) {
|
||||
m := metrics.NewTestMetrics()
|
||||
|
||||
// Create a command
|
||||
cmd, err := NewSQLCommand("A", "someformat", "select * from foo", 0, 0, 0)
|
||||
cmd, err := NewSQLCommand(t.Context(), "A", "someformat", "select * from foo", 0, 0, 0)
|
||||
require.NoError(t, err)
|
||||
|
||||
// Execute successful command
|
||||
|
||||
Reference in New Issue
Block a user