diff options
| author | Paul Buetow <paul@buetow.org> | 2021-12-12 20:37:32 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2021-12-12 20:37:32 +0000 |
| commit | a040084be859997b63cc5f8b627ae52ed52a9e24 (patch) | |
| tree | fb2b6c175e5a772b5501e7618ec75eee46636c0f /integrationtests | |
| parent | c1e52e7a7fd925ae8450708c4337d6808e014ba4 (diff) | |
add set condition integraion test
Diffstat (limited to 'integrationtests')
| -rw-r--r-- | integrationtests/dmap1d.csv.expected | 2 | ||||
| -rw-r--r-- | integrationtests/dmap1d.csv.query.expected | 1 | ||||
| -rw-r--r-- | integrationtests/dmap_test.go | 3 |
3 files changed, 6 insertions, 0 deletions
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 { |
