mirror of
https://github.com/grafana/grafana.git
synced 2024-12-01 21:19:28 -06:00
14a814a280
* [sql expressions] fix: use ast to read tables * can't run tests during ci yet. need to install duckdb * skip for now. need duckdb cli
28 lines
398 B
Go
28 lines
398 B
Go
package expr
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func TestNewCommand(t *testing.T) {
|
|
t.Skip()
|
|
cmd, err := NewSQLCommand("a", "select a from foo, bar")
|
|
if err != nil && strings.Contains(err.Error(), "feature is not enabled") {
|
|
return
|
|
}
|
|
|
|
if err != nil {
|
|
t.Fail()
|
|
return
|
|
}
|
|
|
|
for _, v := range cmd.varsToQuery {
|
|
if strings.Contains("foo bar", v) {
|
|
continue
|
|
}
|
|
t.Fail()
|
|
return
|
|
}
|
|
}
|