Merge pull request #88 from basho/remove-legacy-listkeys-test

Removing tests for legacy listkeys
Was plus one'd by Sean, merging
This commit is contained in:
engelsanchez 2012-11-20 12:32:49 -08:00
commit 79fada8b65

View File

@ -90,10 +90,9 @@ put_keys(Node, Bucket, Num) ->
[riakc_pb_socket:put(Pid, riakc_obj:new(Bucket, Key, Val)) || {Key, Val} <- lists:zip(Keys, Vals)],
riakc_pb_socket:stop(Pid).
list_keys(Node, Bucket, Attempt, Legacy, Num, ShouldPass) ->
list_keys(Node, Bucket, Attempt, Num, ShouldPass) ->
Pid = rt:pbc(Node),
lager:info("Listing keys on ~p. Legacy: ~p, Attempt #~p", [Node, Legacy, Attempt]),
rpc:call(Node, application, set_env, [riak_kv, legacy_keylisting, Legacy]),
lager:info("Listing keys on ~p. Attempt #~p", [Node, Attempt]),
case ShouldPass of
true ->
@ -115,10 +114,9 @@ put_buckets(Node, Num) ->
[riakc_pb_socket:put(Pid, riakc_obj:new(Bucket, Key, Val)) || Bucket <- Buckets],
riakc_pb_socket:stop(Pid).
list_buckets(Node, Attempt, Legacy, Num, ShouldPass) ->
list_buckets(Node, Attempt, Num, ShouldPass) ->
Pid = rt:pbc(Node),
lager:info("Listing buckets on ~p. Legacy: ~p, Attempt #~p", [Node, Legacy, Attempt]),
rpc:call(Node, application, set_env, [riak_kv, legacy_keylisting, Legacy]),
lager:info("Listing buckets on ~p. Attempt #~p", [Node, Attempt]),
{Status, Buckets} = riakc_pb_socket:list_buckets(Pid),
?assertEqual(ok, Status),
@ -148,5 +146,5 @@ check_it_all(Nodes, ShouldPass) ->
[check_a_node(N, ShouldPass) || N <- Nodes].
check_a_node(Node, ShouldPass) ->
[list_keys(Node, ?BUCKET, Attempt, Legacy, ?NUM_KEYS, ShouldPass) || Attempt <- [1,2,3], Legacy <- [true, false]],
[list_buckets(Node, Attempt, Legacy, ?NUM_BUCKETS, ShouldPass) || Attempt <- [1,2,3], Legacy <- [true, false]].
[list_keys(Node, ?BUCKET, Attempt, ?NUM_KEYS, ShouldPass) || Attempt <- [1,2,3] ],
[list_buckets(Node, Attempt, ?NUM_BUCKETS, ShouldPass) || Attempt <- [1,2,3] ].