Adjust templates_tests to reflect reality

Where clauses generated by the query builder have "WHERE" capitalized,
and supply template variables with the ":" bracing.
pull/4934/head
Tim Raymond 2017-06-13 14:58:14 -04:00
parent d3ac2375b6
commit f8ebb13bdb
1 changed files with 2 additions and 2 deletions

View File

@ -138,7 +138,7 @@ func TestTemplateReplace(t *testing.T) {
},
{
name: "auto group by without duration",
query: `SELECT mean(usage_idle) from "cpu" where time > now() - 4320h :autoGroupBy:`,
query: `SELECT mean(usage_idle) from "cpu" WHERE time > now() - 4320h :autoGroupBy:`,
vars: chronograf.TemplateVars{
&chronograf.GroupByVar{
Var: ":autoGroupBy:",
@ -185,7 +185,7 @@ func TestTemplateReplace(t *testing.T) {
func Test_TemplateVarsUnmarshalling(t *testing.T) {
req := `[
{
"tempVar": "autoGroupBy",
"tempVar": ":autoGroupBy:",
"duration": 15552000,
"resolution": 1000,
"reportingInterval": 10