diff options
author | Jan Zeleny <jzeleny@redhat.com> | 2011-03-30 08:38:41 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-04-25 08:06:34 -0400 |
commit | 0e5879c0e3f83b0bbaff79d9c97f672055b61c4f (patch) | |
tree | 091171a2ae53082ef12e292a8d355ba32659fbd5 /src/config/SSSDConfigTest.py | |
parent | 7a0e6e2b9fc2fffc10f33e90926bb7edb5198dde (diff) | |
download | sssd-0e5879c0e3f83b0bbaff79d9c97f672055b61c4f.tar.gz sssd-0e5879c0e3f83b0bbaff79d9c97f672055b61c4f.tar.xz sssd-0e5879c0e3f83b0bbaff79d9c97f672055b61c4f.zip |
Configuration parsing updates
These changes are all related to following ticket:
https://fedorahosted.org/sssd/ticket/763
Changes in SSSDConfig.py merge old and new domain record instead of just
deleting the old and inserting the new one. The old approach let to loss
of some information like comments and blank lines in the config file.
Changes in API config were performed so our Python scripts (like
sss_obfuscate) don't add extra config options to the config file.
Diffstat (limited to 'src/config/SSSDConfigTest.py')
-rwxr-xr-x | src/config/SSSDConfigTest.py | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/src/config/SSSDConfigTest.py b/src/config/SSSDConfigTest.py index cad183ea0..af32acc67 100755 --- a/src/config/SSSDConfigTest.py +++ b/src/config/SSSDConfigTest.py @@ -599,33 +599,7 @@ class SSSDConfigTestSSSDDomain(unittest.TestCase): # First test default options options = domain.list_mandatory_options() - control_list = [ - 'cache_credentials', - 'id_provider', - 'auth_provider'] - - self.assertTrue(type(options) == dict, - "Options should be a dictionary") - - # Ensure that all of the expected defaults are there - for option in control_list: - self.assertTrue(option in options.keys(), - "Option [%s] missing" % - option) - - # Ensure that there aren't any unexpected options listed - for option in options.keys(): - self.assertTrue(option in control_list, - 'Option [%s] unexpectedly found' % - option) - - # Add a provider and verify that the new options appear - domain.add_provider('local', 'id') - control_list.extend( - ['default_shell', - 'base_directory']) - - options = domain.list_mandatory_options() + control_list = ['id_provider'] self.assertTrue(type(options) == dict, "Options should be a dictionary") @@ -1000,11 +974,6 @@ class SSSDConfigTestSSSDDomain(unittest.TestCase): def testRemoveOption(self): domain = SSSDConfig.SSSDDomain('sssd', self.schema) - # Positive test - Remove existing option - self.assertTrue('cache_credentials' in domain.get_all_options().keys()) - domain.remove_option('cache_credentials') - self.assertFalse('cache_credentials' in domain.get_all_options().keys()) - # Positive test - Remove unset but valid option self.assertFalse('max_id' in domain.get_all_options().keys()) domain.remove_option('max_id') |