From e54764d62bfcc48770d9b2578132979aa58636e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Wed, 16 Aug 2017 10:45:19 +0200 Subject: [PATCH 65/93] TEST_NEGCACHE: Test that "root" is always added to ncache MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Simply modify test_sss_ncache_prepopulate() in order to ensure that "root" user and group are always added to the negative cache, no matter whether they're set as part of the filter_users or filter_groups options. Related: https://pagure.io/SSSD/sssd/issue/3460 Signed-off-by: Fabiano FidĂȘncio Reviewed-by: Jakub Hrozek --- src/tests/cmocka/test_negcache.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tests/cmocka/test_negcache.c b/src/tests/cmocka/test_negcache.c index d608c20ad3248c80e68029c8c27b826395a61ddc..163e4653e0aa423eb5ccc4206734dec3a40050e6 100644 --- a/src/tests/cmocka/test_negcache.c +++ b/src/tests/cmocka/test_negcache.c @@ -630,6 +630,12 @@ static void test_sss_ncache_prepopulate(void **state) ret = check_group_in_ncache(ncache, dom, "testgroup3@somedomain"); assert_int_equal(ret, ENOENT); + + ret = check_user_in_ncache(ncache, dom, "root"); + assert_int_equal(ret, EEXIST); + + ret = check_group_in_ncache(ncache, dom, "root"); + assert_int_equal(ret, EEXIST); } static void test_sss_ncache_default_domain_suffix(void **state) -- 2.14.1