Files
grafana/pkg/tsdb/influxdb/flux/builder_test.go
T
2020-06-22 13:44:41 -07:00

27 lines
567 B
Go

package flux
import (
"testing"
)
func TestColumnIdentification(t *testing.T) {
t.Run("Test Tag Identification", func(t *testing.T) {
tagNames := []string{"header", "value", "tag"}
for _, item := range tagNames {
if !isTag(item) {
t.Fatal("Tag", item, "Expected tag, but got false")
}
}
})
t.Run("Test Special Case Tag Identification", func(t *testing.T) {
notTagNames := []string{"table", "result"}
for _, item := range notTagNames {
if isTag(item) {
t.Fatal("Special tag", item, "Expected NOT a tag, but got true")
}
}
})
}