Petr Viktorin wrote:
On 09/13/2013 04:12 PM, Tomas Babej wrote:
The following patches move and extend the functionality of Fuzzy
objects. This is necessary to use them from within integration tests.
-1 to the idea.
I'm not a fan of the Fuzzy objects; they basically exist so that you can
use regex matching in the Declarative tests.
As you've probably noticed Fuzzy is quite specific to the framework and
its test suite -- see the strict bytes/unicode separation and the amount
of changes it takes to tear them out.
I'm also not a fan of having a generic "Match anything using some rules"
object where everybody adds behavior specific to their use case. Each
addition increases the complexity and number of corner cases, and the
complete intended functionality can never be achieved.
Using regular expressions directly should actually be easier and less
error-prone in most cases.
If you disagree, I'd like to see your use case.
I'm not sure what the objection is, Fuzzy is just an abstraction. It
lets one do in-line regex which is the reason it was introduced
(initially for uid and gid because they are non-deterministic).
Replacing it would either a) replicate its functionality almost
completely or b) spread duplicate regex code all over the place.
That isn't to say that Fuzzy isn't being abused, but that is also the
responsibility of the reviewers to be strict about.
Freeipa-devel mailing list