On (18/11/15 16:36), Michal Židek wrote:
>On 11/14/2015 01:56 PM, Jakub Hrozek wrote:
>>On Fri, Nov 13, 2015 at 09:42:15PM +0200, Nikolai Kondrashov wrote:
>>>On 11/13/2015 07:06 PM, Pavel Reichl wrote:
>>>>On 11/13/2015 05:44 PM, Nikolai Kondrashov wrote:
>>>>>On 11/13/2015 06:19 PM, Pavel Reichl wrote:
>>>>>>Thanks Nick, updated patch attached.
>>>>>
>>>>>Thanks, Pavel, this looks really neat now! I have only two comments.
>>>>>
>>>>>>+def test_simple_user_override(ldap_conn,
env_simple_user_override):
>>>>>>+ """Test entries are
overriden"""
>>>>>>+
>>>>>>+
>>>>>
>>>>>Shouldn't there be an actual test here?
>>>>Sorry :-)
>>>
>>>No problem :)
>>>
>>>>>
>>>>>>+# Regression test for bug #2802
>>>>>>+# sss_override segfaults when accidentally adding --help flag to
some commands
>>>>>>+
>>>>>>+
>>>>>>+def test_regr_2802_override(request, ldap_conn):
>>>>>>+ prepare_sssd(request, ldap_conn)
>>>>>
>>>>>I had no idea this could actually work, I mean getting
"request" in a test.
>>>>>Can you give a link to documentation where this is explained?
>>>>
>>>>I don't have any, I was in a hurry and I did a mistake.
>>>
>>>Ah, fine.
>>>
>>>>>Otherwise, could you please move the setup to a proper fixture? Tests
are not
>>>>>supposed to have setup/teardown inside, AFAIK, unless this is really
official.
>>>>>
>>>>>>+
>>>>>>+ subprocess.check_call(["sss_override",
"user-del", "--help"])
>>>>
>>>>Sure.
>>>
>>>Thanks a lot!
>>>
>>>Looks fine to me now. Tests passed on my machine both all together, and each
>>>separately. Great job!
>>>
>>>ACK
>>>
>>>Nick
>>
>>Pushed to master so far: 8d1dcb6af723f2968410c4b088d06d63d02b4fea
>>
>>We can push all these to sssd-1-13 later, when CI ressurects.
>
>Sorry, I did not follow this thread too carefully when it was
>"hot", but I noticed that there is a sss_cache call in the
>teardown function.
>
>This call is not useful anymore and we already removed
>it form other tests while Pavel was working on the
>override tests (so we kind of missed this one).
>Please see attached one-liner patch.
>
>Michal
>From a40b600910815f93c56c690b035d4375de91682b Mon Sep 17 00:00:00 2001
>From: =?UTF-8?q?Michal=20=C5=BDidek?= <mzidek(a)redhat.com>
>Date: Wed, 18 Nov 2015 16:18:49 +0100
>Subject: [PATCH] ldap_local_override_test: Remove sss_cache from teardown
>
>The local override tests were added after we alredy removed
>the sss_cache call from teardowns in other tests. See
>commit: 782d39e3916d16b8dbba6ae97aca1db2f3c35d76
>Revert "intg: Invalidate memory cache before removing files"
>---
> src/tests/intg/ldap_local_override_test.py | 1 -
> 1 file changed, 1 deletion(-)
>
>diff --git a/src/tests/intg/ldap_local_override_test.py
b/src/tests/intg/ldap_local_override_test.py
>index b557467..235c1c9 100644
>--- a/src/tests/intg/ldap_local_override_test.py
>+++ b/src/tests/intg/ldap_local_override_test.py
>@@ -109,7 +109,6 @@ def create_sssd_fixture(request):
> stop_sssd()
> except:
> pass
>- subprocess.call(["sss_cache", "-E"])
> for path in os.listdir(config.DB_PATH):
> os.unlink(config.DB_PATH + "/" + path)
> for path in os.listdir(config.MCACHE_PATH):
ACK
http://sssd-ci.duckdns.org/logs/job/33/47/summary.html