diff options
author | Lukas Slebodnik <lslebodn@redhat.com> | 2015-10-15 10:32:09 +0200 |
---|---|---|
committer | Lukas Slebodnik <lslebodn@redhat.com> | 2015-10-19 14:14:48 +0200 |
commit | 87ef67286b64af98d32a3a5abcd28a9c2886f751 (patch) | |
tree | 90d9fd09d5942e256cc6acb1510db189b6d9fbf2 | |
parent | 6a044fa43d53638c1d0b874d43f58c0428820362 (diff) | |
download | sssd-87ef67286b64af98d32a3a5abcd28a9c2886f751.tar.gz sssd-87ef67286b64af98d32a3a5abcd28a9c2886f751.tar.xz sssd-87ef67286b64af98d32a3a5abcd28a9c2886f751.zip |
SSSDConfigTest: Try load saved config
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>
-rwxr-xr-x | src/config/SSSDConfigTest.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/config/SSSDConfigTest.py b/src/config/SSSDConfigTest.py index a850b8d2c..8a4a2b30a 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") |