riak_test/tests/ts_A_put_invalid_data.erl
2015-11-19 20:13:26 +00:00

23 lines
536 B
Erlang

-module(ts_A_put_invalid_data).
%%
%% this test tries to write well structured data that doesn't
%% meet the criteria defined in the DDL into a bucket
%%
-behavior(riak_test).
-export([confirm/0]).
-include_lib("eunit/include/eunit.hrl").
confirm() ->
ClusterType = single,
DDL = ts_util:get_ddl(docs),
Obj = [ts_util:get_invalid_obj()],
Expected = {error, {1003,<<"Invalid data">>}},
Got = ts_util:ts_put(ts_util:cluster_and_connect(ClusterType), normal, DDL, Obj),
?assertEqual(Expected, Got),
pass.