mirror of
https://github.com/valitydev/riak_test.git
synced 2024-11-06 08:35:22 +00:00
Add test for mapred enabled via protocol buffers
This commit is contained in:
parent
8baf79f86d
commit
b5fea23ce5
@ -95,8 +95,8 @@ verify_features_enabled_http(Client) ->
|
||||
verify_features_enabled_pb(Client) ->
|
||||
verify_list_buckets_enabled_pb(Client),
|
||||
verify_list_keys_enabled_pb(Client),
|
||||
verify_secondary_index_enabled_pb(Client).
|
||||
%%verify_map_reduce_enabled_pb().
|
||||
verify_secondary_index_enabled_pb(Client),
|
||||
verify_mapred_enabled_pb(Client).
|
||||
|
||||
verify_list_buckets_disabled_pb(Client) ->
|
||||
Expected = {error, <<"Operation 'list_buckets' is not enabled">>},
|
||||
@ -129,6 +129,12 @@ verify_secondary_index_enabled_pb(Client) ->
|
||||
Result = riakc_pb_socket:get_index_eq(Client, <<"2i_test">>, {integer_index, "test_idx"}, 42),
|
||||
?assertMatch({ok, {index_results_v1, [<<"2">>], _, _}}, Result).
|
||||
|
||||
verify_mapred_enabled_pb(Client) ->
|
||||
{ok, [{_, Results}]} = riakc_pb_socket:mapred(Client, <<"basic_test">>, []),
|
||||
SortedResults = lists:sort(Results),
|
||||
Expected = [{<<"basic_test">>, integer_to_binary(K)} || K <- lists:seq(1, 3)],
|
||||
?assertEqual(Expected, SortedResults).
|
||||
|
||||
verify_list_buckets_disabled_http(Client) ->
|
||||
Result = rhc:list_buckets(Client),
|
||||
?assertMatch({error, {"403", _}}, Result).
|
||||
|
Loading…
Reference in New Issue
Block a user