From 193236933b0f4ab91b1625b64e2187e2db4e0e8f Mon Sep 17 00:00:00 2001 From: Brad Bishop Date: Fri, 5 Apr 2019 15:28:33 -0400 Subject: reset upstream subtrees to HEAD Reset the following subtrees on HEAD: poky: 8217b477a1(master) meta-xilinx: 64aa3d35ae(master) meta-openembedded: 0435c9e193(master) meta-raspberrypi: 490a4441ac(master) meta-security: cb6d1c85ee(master) Squashed patches: meta-phosphor: drop systemd 239 patches meta-phosphor: mrw-api: use correct install path Change-Id: I268e2646d9174ad305630c6bbd3fbc1a6105f43d Signed-off-by: Brad Bishop --- meta-security/lib/oeqa/runtime/cases/sssd.py | 37 ++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 meta-security/lib/oeqa/runtime/cases/sssd.py (limited to 'meta-security/lib/oeqa/runtime/cases/sssd.py') diff --git a/meta-security/lib/oeqa/runtime/cases/sssd.py b/meta-security/lib/oeqa/runtime/cases/sssd.py new file mode 100644 index 000000000..464483625 --- /dev/null +++ b/meta-security/lib/oeqa/runtime/cases/sssd.py @@ -0,0 +1,37 @@ +# Copyright (C) 2019 Armin Kuster +# +import re + +from oeqa.runtime.case import OERuntimeTestCase +from oeqa.core.decorator.depends import OETestDepends +from oeqa.runtime.decorator.package import OEHasPackage + + +class SSSDTest(OERuntimeTestCase): + + @OEHasPackage(['sssd']) + @OETestDepends(['ssh.SSHTest.test_ssh']) + def test_sssd_help(self): + status, output = self.target.run('sssctl --help') + msg = ('sssctl command does not work as expected. ' + 'Status and output:%s and %s' % (status, output)) + self.assertEqual(status, 1, msg = msg) + + @OETestDepends(['sssd.SSSDTest.test_sssd_help']) + def test_sssd_sssctl_conf_perms_chk(self): + status, output = self.target.run('sssctl domain-status') + match = re.search('ConfDB initialization has failed', output) + if match: + msg = ('sssctl domain-status failed, check sssd.conf perms. ' + 'Status and output:%s and %s' % (status, output)) + self.assertEqual(status, 0, msg = msg) + + @OETestDepends(['sssd.SSSDTest.test_sssd_sssctl_conf_perms_chk']) + def test_sssd_sssctl_deamon(self): + status, output = self.target.run('sssctl domain-status') + match = re.search('No domains configured, fatal error!', output) + if match: + msg = ('sssctl domain-status failed, sssd.conf not setup correctly. ' + 'Status and output:%s and %s' % (status, output)) + self.assertEqual(status, 0, msg = msg) + -- cgit v1.2.3