[Freeipa-devel] [freeipa PR#448][comment] Tests: Basic coverage with tree root domain

martbab freeipa-github-notification at redhat.com
Fri Feb 10 13:17:26 UTC 2017


  URL: https://github.com/freeipa/freeipa/pull/448
Title: #448: Tests: Basic coverage with tree root domain

martbab commented:
"""
If you look at the test cases (e.g. test_login_ipa-user, test_login_ad_user, test_login_subdomain_user are the 'best: examples) you can see that the function body is the same code copy-pasted with slight alterations so that it works for the new case. Your patch adds a *fourth* level of copy-pasta to the code, which is something that grieves me greatly.

Clearly, you can group the common code into a private method that can be only called with the use-case specific parameters for each test case. Or you can expand the existing mixing hierarchy to achieve this. Then it would also be simpler to extend the test cases for tree-root domains.
"""

See the full comment at https://github.com/freeipa/freeipa/pull/448#issuecomment-278939703


More information about the Freeipa-devel mailing list