Fix test to expect 404 instead of 201. ensure_doc(B,undefined) will return {error, undefined}. See https://github.com/basho/riak_kv/pull/237

This commit is contained in:
Chris Tilt 2013-10-23 16:04:12 -07:00
parent aac953b7ea
commit c1baf8e423

View File

@ -57,7 +57,9 @@ confirm() ->
rt:httpc_write(HTTP, <<"failkey">>, <<"fail">>, <<"value">>)), rt:httpc_write(HTTP, <<"failkey">>, <<"fail">>, <<"value">>)),
lager:info("Checking fix for BZ1244 - riak_kv_wm_object makes call to riak_client:get/3 with invalid type for key"), lager:info("Checking fix for BZ1244 - riak_kv_wm_object makes call to riak_client:get/3 with invalid type for key"),
?assertMatch({error, {ok, "201", _, _}}, %% riak_kv_wm_object:ensure_doc will return {error, not_found}, leading to 404.
%% see https://github.com/basho/riak_kv/pull/237 for details of the fix.
?assertMatch({error, {ok, "404", _, _}},
rt:httpc_write(HTTP, <<"bz1244bucket">>, undefined, <<"value">>)), rt:httpc_write(HTTP, <<"bz1244bucket">>, undefined, <<"value">>)),
lager:info("Checking that postcommit fires."), lager:info("Checking that postcommit fires."),