Skip to content

Commit

Permalink
failing test for issue basho#706, failing test output:
Browse files Browse the repository at this point in the history
riak_core_security_tests: security_test_ (Issue 706, error formatted correctly for unauthorized and bucket any)...*failed*
in function unicode:characters_to_binary/3
  called as characters_to_binary(any,utf8,utf8)
in call from riak_core_security:check_permission/2 (src/riak_core_security.erl, line 380)
in call from riak_core_security_tests:'-security_test_/0-fun-141-'/1 (test/riak_core_security_tests.erl, line 251)
in call from riak_core_security_tests:'-security_test_/0-fun-142-'/0 (test/riak_core_security_tests.erl, line 251)
**error:badarg
  • Loading branch information
marianoguerra committed Feb 19, 2015
1 parent 7898729 commit 0cd8380
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions test/riak_core_security_tests.erl
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,15 @@ security_test_() ->
?assertEqual(ok, riak_core_security:add_user(<<"fred">>, [])),
?assertMatch({error, {unknown_role, _}}, riak_core_security:print_grants(<<"group/fred">>)),
ok
end}}
]}.
end}},
{timeout, 60, { "Issue 706, error formatted correctly for unauthorized and bucket any",
fun() ->
?assertEqual(ok, riak_core_security:add_user(<<"sysadmin">>, [{"password", "password"}])),
?assertEqual(ok, riak_core_security:add_source([<<"sysadmin">>], {{127, 0, 0, 1}, 32}, password, [])),
{ok, Ctx} = riak_core_security:authenticate(<<"sysadmin">>, <<"password">>,
[{ip, {127, 0, 0, 1}}]),
?assertMatch({false, _}, riak_core_security:check_permissions({"riak_kv.get", any}, Ctx)),
ok
end}}]}.

-endif.

0 comments on commit 0cd8380

Please sign in to comment.