mirror of
https://github.com/valitydev/riak_test.git
synced 2024-11-06 16:45:29 +00:00
API Changed from riakc 1.2.1 to 1.3.0
This commit is contained in:
parent
669b82b7cc
commit
debe9154ec
@ -48,7 +48,7 @@ put_an_object(Pid, N) ->
|
|||||||
assertExactQuery(Pid, Expected, Index, Value) ->
|
assertExactQuery(Pid, Expected, Index, Value) ->
|
||||||
lager:debug("Searching Index ~p for ~p", [Index, Value]),
|
lager:debug("Searching Index ~p for ~p", [Index, Value]),
|
||||||
{ok, Results} = riakc_pb_socket:get_index(Pid, ?BUCKET, Index, Value),
|
{ok, Results} = riakc_pb_socket:get_index(Pid, ?BUCKET, Index, Value),
|
||||||
ActualKeys = lists:sort([Key || [?BUCKET, Key] <- Results]),
|
ActualKeys = lists:sort(Results),
|
||||||
lager:debug("Expected: ~p", [Expected]),
|
lager:debug("Expected: ~p", [Expected]),
|
||||||
lager:debug("Actual : ~p", [ActualKeys]),
|
lager:debug("Actual : ~p", [ActualKeys]),
|
||||||
?assertEqual(Expected, ActualKeys).
|
?assertEqual(Expected, ActualKeys).
|
||||||
@ -56,7 +56,7 @@ assertExactQuery(Pid, Expected, Index, Value) ->
|
|||||||
assertRangeQuery(Pid, Expected, Index, StartValue, EndValue) ->
|
assertRangeQuery(Pid, Expected, Index, StartValue, EndValue) ->
|
||||||
lager:debug("Searching Index ~p for ~p-~p", [Index, StartValue, EndValue]),
|
lager:debug("Searching Index ~p for ~p-~p", [Index, StartValue, EndValue]),
|
||||||
{ok, Results} = riakc_pb_socket:get_index(Pid, ?BUCKET, Index, StartValue, EndValue),
|
{ok, Results} = riakc_pb_socket:get_index(Pid, ?BUCKET, Index, StartValue, EndValue),
|
||||||
ActualKeys = lists:sort([Key || [?BUCKET, Key] <- Results]),
|
ActualKeys = lists:sort(Results),
|
||||||
lager:debug("Expected: ~p", [Expected]),
|
lager:debug("Expected: ~p", [Expected]),
|
||||||
lager:debug("Actual : ~p", [ActualKeys]),
|
lager:debug("Actual : ~p", [ActualKeys]),
|
||||||
?assertEqual(Expected, ActualKeys).
|
?assertEqual(Expected, ActualKeys).
|
Loading…
Reference in New Issue
Block a user