Repository: ambari Updated Branches: refs/heads/trunk 731fe2661 -> eb7e11c63
AMBARI-9300. Tests fail with python 2.6. (Yurii Shylov via mahadev) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/eb7e11c6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/eb7e11c6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/eb7e11c6 Branch: refs/heads/trunk Commit: eb7e11c639be80d89531232b202d44f25e1c2636 Parents: 731fe26 Author: Mahadev Konar <maha...@apache.org> Authored: Fri Jan 23 10:31:07 2015 -0800 Committer: Mahadev Konar <maha...@apache.org> Committed: Fri Jan 23 10:31:07 2015 -0800 ---------------------------------------------------------------------- .../resource_management/TestSecurityCommons.py | 33 ++++++++------------ 1 file changed, 13 insertions(+), 20 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/eb7e11c6/ambari-agent/src/test/python/resource_management/TestSecurityCommons.py ---------------------------------------------------------------------- diff --git a/ambari-agent/src/test/python/resource_management/TestSecurityCommons.py b/ambari-agent/src/test/python/resource_management/TestSecurityCommons.py index 602b88b..918aed1 100644 --- a/ambari-agent/src/test/python/resource_management/TestSecurityCommons.py +++ b/ambari-agent/src/test/python/resource_management/TestSecurityCommons.py @@ -142,27 +142,20 @@ class TestSecurityCommons(TestCase): } result = get_params_from_filesystem(conf_dir, config_file) + expected = { + 'test_jaas': { + 'Client': { + 'keyTab': '/etc/security/keytabs/hbase.service.keytab', + 'useTicketCache': 'false', + 'storeKey': 'true', + 'com.sun.security.auth.module.Krb5LoginModule': 'required', + 'useKeyTab': 'true', + 'principal': 'hbase/vp-ambari-ranger-med-0120-2.cs1cloud.inter...@example.com' + } + } + } - self.assertIn('test_jaas', result) - self.assertIn('Client', result['test_jaas']) - - self.assertIn('com.sun.security.auth.module.Krb5LoginModule', result['test_jaas']['Client']) - self.assertEquals('required', result['test_jaas']['Client']['com.sun.security.auth.module.Krb5LoginModule']) - - self.assertIn('useKeyTab', result['test_jaas']['Client']) - self.assertEquals('true', result['test_jaas']['Client']['useKeyTab']) - - self.assertIn('storeKey', result['test_jaas']['Client']) - self.assertEquals('true', result['test_jaas']['Client']['storeKey']) - - self.assertIn('useTicketCache', result['test_jaas']['Client']) - self.assertEquals('false', result['test_jaas']['Client']['useTicketCache']) - - self.assertIn('keyTab', result['test_jaas']['Client']) - self.assertEquals('/etc/security/keytabs/hbase.service.keytab', result['test_jaas']['Client']['keyTab']) - - self.assertIn('principal', result['test_jaas']['Client']) - self.assertEquals('hbase/vp-ambari-ranger-med-0120-2.cs1cloud.inter...@example.com', result['test_jaas']['Client']['principal']) + self.assertEquals(expected, result) os.unlink(jaas_file_path)