mirror of
https://github.com/valitydev/riak_test.git
synced 2024-11-06 16:45:29 +00:00
Merge pull request #1028 from basho/at_aggregation_negation_tests
Negate an aggregation test
This commit is contained in:
commit
133a37f834
@ -66,6 +66,8 @@ confirm() ->
|
||||
|
||||
div_aggregate_function_by_zero_test(Conn, Bucket, Where),
|
||||
|
||||
negate_an_aggregation_test(Conn, Bucket, Where),
|
||||
|
||||
pass.
|
||||
|
||||
%%
|
||||
@ -83,3 +85,11 @@ div_aggregate_function_by_zero_test(Conn, Bucket, Where) ->
|
||||
{error,{1001,<<"divide_by_zero">>}},
|
||||
ts_util:single_query(Conn, Query)
|
||||
).
|
||||
|
||||
%%
|
||||
negate_an_aggregation_test(Conn, Bucket, Where) ->
|
||||
Query = "SELECT -COUNT(*), COUNT(*) FROM " ++ Bucket ++ Where,
|
||||
?assertEqual(
|
||||
{[<<"-COUNT(*)">>, <<"COUNT(*)">>],[{-10, 10}]},
|
||||
ts_util:single_query(Conn, Query)
|
||||
).
|
Loading…
Reference in New Issue
Block a user