On 05/18/2015 04:19 PM, Nikolai Kondrashov wrote:
> On 05/15/2015 08:19 PM, Nikolai Kondrashov wrote:
>> On 05/15/2015 07:14 PM, Michal Židek wrote:
>>> Well they are the first tests that use this new code, so they
>>> will be examples for others when writing new tests. It will
>>> be helpful for developers to see the function in real context.
>>> So I think it is worth the effort and the tests can be really
>>> simple. Additionally we will test the assert_ functions
>>> themselves this way (this is IMO important).
>>
>> Alright, will do.
>
> I can't think of good real tests using all of the functions, so I'll
> write a
> separate test module explicitly testing all ent.py assert_* functions
> with
> passwd/group entries in files (not involving LDAP and sssd) for
> simplicity and
> speed.
>
> I think that will have a good set of examples.
Alright, here is the fourth version. Changes from v3 include:
* Simplified assert_passwd/group functions: removed list/name/uid/gid
arguments - everything is now checked unconditionally. Moved the
name/uid/gid retrieval checking out into functions, so they can be
checked
separately.
* Added ent_test.py - an ent.py test suite running basic checks on exposed
assert_* functions and providing some usage examples.
* Moved pattern structure descriptions to global variables in ent.py - less
copy-pasting now, more readable.
* Made ent.diff* functions private by prepending their names with
underscore.
* Made py.test run from abs_srcdir so filenames in output are short.
* Added support for supplying extra py.test args via INTGCHECK_PYTEST_ARGS
variable. Can be used for limiting the set of tests to run.
* Increased py.test output verbosity, so each test name is printed out.
* Reduced amount of blank lines in source to one line between functions, no
trailing newlines in files.
CI result:
http://sssd-ci.duckdns.org/logs/job/15/51/summary.html
Nick
All my concerns were addressed in this version. Other enhancements
can be made as separate tickets. Will wait for the CI to finish
before I give ACK.
Michal