[Freeipa-devel] [PATCH 28/28] Update test_role_plugin test to include a comma in a, privilege

John Dennis jdennis at redhat.com
Wed Jun 15 20:25:17 UTC 2011


Update test_role_plugin test to include a comma in a privilege

Introduce a comma into a privilege name to assure we can handle
commas.

Commas must be escaped for some parameters, add escape_comma() utility
and invoke it for the necessary parameters.

Utilize a DN object to properly construct a DN and most importantly to
allow equality testing between the DN we expect and the one
returned. This is necessary because a DN can be encoded according to
different encoding syntaxes all of which are valid. DN objects always
decode from their input. DN objects can test for equality between DN's
without being affected by DN encoding.

Add a equality callback for the dn in the expected dict. When the test
framework tests for equality between the expected value and the
returned value it will call back into a function we provide which will
convert the returned dn into a DN object. An equality test is then
performed between two DN objects. This is the only way to properly
compare two dn's.

-- 
John Dennis <jdennis at redhat.com>

Looking to carve out IT costs?
www.redhat.com/carveoutcosts/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0028-Update-test_role_plugin-test-to-include-a-comma-in-a.patch
Type: text/x-patch
Size: 4111 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20110615/2ae92f1e/attachment.bin>


More information about the Freeipa-devel mailing list