From a040084be859997b63cc5f8b627ae52ed52a9e24 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 12 Dec 2021 20:37:32 +0000 Subject: add set condition integraion test --- integrationtests/dmap1d.csv.expected | 2 ++ integrationtests/dmap1d.csv.query.expected | 1 + integrationtests/dmap_test.go | 3 +++ 3 files changed, 6 insertions(+) create mode 100644 integrationtests/dmap1d.csv.expected create mode 100644 integrationtests/dmap1d.csv.query.expected (limited to 'integrationtests') diff --git a/integrationtests/dmap1d.csv.expected b/integrationtests/dmap1d.csv.expected new file mode 100644 index 0000000..5a5be41 --- /dev/null +++ b/integrationtests/dmap1d.csv.expected @@ -0,0 +1,2 @@ +$mask,$md5,$foo,$bar,$baz,last($time) +........-......,f1d0d65f3bd3824e71d690163a58fef2,42,baz,20211002-071949,20211002-071949 diff --git a/integrationtests/dmap1d.csv.query.expected b/integrationtests/dmap1d.csv.query.expected new file mode 100644 index 0000000..67773b2 --- /dev/null +++ b/integrationtests/dmap1d.csv.query.expected @@ -0,0 +1 @@ +from STATS select $mask,$md5,$foo,$bar,$baz,last($time), set $mask = maskdigits($time), $md5 = md5sum($time), $foo = 42, $bar = "baz", $baz = $time group by $hostname outfile dmap1d.csv.tmp \ No newline at end of file diff --git a/integrationtests/dmap_test.go b/integrationtests/dmap_test.go index 4321f70..34dab24 100644 --- a/integrationtests/dmap_test.go +++ b/integrationtests/dmap_test.go @@ -25,6 +25,9 @@ func TestDMap1(t *testing.T) { "c": "from STATS select count($line),last($time)," + "avg($goroutines),min(concurrentConnections),max(lifetimeConnections) " + "group by $hostname where $time eq \"20211002-071949\"", + "d": "from STATS select $mask,$md5,$foo,$bar,$baz,last($time)," + + " set $mask = maskdigits($time), $md5 = md5sum($time), " + + "$foo = 42, $bar = \"baz\", $baz = $time group by $hostname", } for subtestName, query := range testTable { -- cgit v1.2.3