c08e64289b
- Resolves: upstream #2837 - REGRESSION: ipa-client-automout failed
61 lines
2.3 KiB
Diff
61 lines
2.3 KiB
Diff
From dab0d1655f5e2451fc8ded804763ac4549ffd978 Mon Sep 17 00:00:00 2001
|
|
From: Lukas Slebodnik <lslebodn@redhat.com>
|
|
Date: Thu, 15 Oct 2015 10:32:09 +0200
|
|
Subject: [PATCH 5/6] SSSDConfigTest: Try load saved config
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Python module SSSDConfig should be able to save configuration file
|
|
and later load the same configuration file without problem.
|
|
|
|
Unit test for:
|
|
https://fedorahosted.org/sssd/ticket/2837
|
|
|
|
Reviewed-by: Michal Židek <mzidek@redhat.com>
|
|
(cherry picked from commit 87ef67286b64af98d32a3a5abcd28a9c2886f751)
|
|
(cherry picked from commit 69612bc5d0a9219ecccf3e8c6410059322aeecc6)
|
|
---
|
|
src/config/SSSDConfigTest.py | 12 +++++++++++-
|
|
1 file changed, 11 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/config/SSSDConfigTest.py b/src/config/SSSDConfigTest.py
|
|
index a850b8d2c5933c4c08b5b0e8f4db79f3c88fc5ee..8a4a2b30a8a5b2422075fd614626d14e6f803a18 100755
|
|
--- a/src/config/SSSDConfigTest.py
|
|
+++ b/src/config/SSSDConfigTest.py
|
|
@@ -157,10 +157,14 @@ class SSSDConfigTestValid(unittest.TestCase):
|
|
#non-owners, and should not be executable by anyone
|
|
self.assertFalse(S_IMODE(mode) & 0o177)
|
|
|
|
+ # try to import saved configuration file
|
|
+ config = SSSDConfig.SSSDConfig(srcdir + "/etc/sssd.api.conf",
|
|
+ srcdir + "/etc/sssd.api.d")
|
|
+ config.import_config(configfile=of)
|
|
+
|
|
#Remove the output file
|
|
os.unlink(of)
|
|
|
|
-
|
|
def testCreateNewLDAPConfig(self):
|
|
sssdconfig = SSSDConfig.SSSDConfig(srcdir + "/etc/sssd.api.conf",
|
|
srcdir + "/etc/sssd.api.d")
|
|
@@ -191,9 +195,15 @@ class SSSDConfigTestValid(unittest.TestCase):
|
|
#non-owners, and should not be executable by anyone
|
|
self.assertFalse(S_IMODE(mode) & 0o177)
|
|
|
|
+ # try to import saved configuration file
|
|
+ config = SSSDConfig.SSSDConfig(srcdir + "/etc/sssd.api.conf",
|
|
+ srcdir + "/etc/sssd.api.d")
|
|
+ config.import_config(configfile=of)
|
|
+
|
|
#Remove the output file
|
|
os.unlink(of)
|
|
|
|
+
|
|
def testModifyExistingConfig(self):
|
|
sssdconfig = SSSDConfig.SSSDConfig(srcdir + "/etc/sssd.api.conf",
|
|
srcdir + "/etc/sssd.api.d")
|
|
--
|
|
2.5.0
|
|
|