ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lpus...@apache.org
Subject [06/51] [abbrv] ambari git commit: AMBARI-21713 Python tests started under uid=0 and uid > 0 works differently, ut fix (dgriennko)
Date Tue, 22 Aug 2017 11:47:34 GMT
AMBARI-21713 Python tests started under uid=0 and uid > 0 works differently, ut fix (dgriennko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fc8dd78e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fc8dd78e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fc8dd78e

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: fc8dd78e145c45db1128b49f66be5aa1919b852f
Parents: 5c78bd7
Author: Dmytro Grinenko <hapylestat@apache.org>
Authored: Wed Aug 16 14:34:29 2017 +0300
Committer: Dmytro Grinenko <hapylestat@apache.org>
Committed: Wed Aug 16 14:34:29 2017 +0300

----------------------------------------------------------------------
 .../test/python/resource_management/TestPackagesAnalyzer.py  | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/fc8dd78e/ambari-agent/src/test/python/resource_management/TestPackagesAnalyzer.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/test/python/resource_management/TestPackagesAnalyzer.py b/ambari-agent/src/test/python/resource_management/TestPackagesAnalyzer.py
index e02e442..a43abaf 100644
--- a/ambari-agent/src/test/python/resource_management/TestPackagesAnalyzer.py
+++ b/ambari-agent/src/test/python/resource_management/TestPackagesAnalyzer.py
@@ -26,19 +26,19 @@ class TestPackagesAnalyzer(TestCase):
   @patch.object(OSCheck, "is_ubuntu_family")
   def test_get_installed_package_version_ubuntu(self, is_ubuntu_family_mock, checked_call_mock):
     is_ubuntu_family_mock.return_value = True
-    checked_call_mock.return_value = (0, '1.2.3','')
+    checked_call_mock.return_value = (0, '1.2.3')
     result = packages_analyzer.getInstalledPackageVersion("package1")
     self.assertEqual(result, '1.2.3')
-    self.assertEqual(checked_call_mock.call_args_list, [call("dpkg -s package1 | grep Version
| awk '{print $2}'", stderr=-1)])
+    self.assertEqual(checked_call_mock.call_args_list, [call("dpkg -s package1 | grep Version
| awk '{print $2}'")])
     
   @patch("resource_management.libraries.functions.packages_analyzer.rmf_shell.checked_call")
   @patch.object(OSCheck, "is_ubuntu_family")
   def test_get_installed_package_version_centos_suse(self, is_ubuntu_family_mock, checked_call_mock):
     is_ubuntu_family_mock.return_value = False
-    checked_call_mock.return_value = (0, '0.0.1-SNAPSHOT','')
+    checked_call_mock.return_value = (0, '0.0.1-SNAPSHOT')
     result = packages_analyzer.getInstalledPackageVersion("package1")
     self.assertEqual(result, '0.0.1-SNAPSHOT')
-    self.assertEqual(checked_call_mock.call_args_list, [call("rpm -q --queryformat '%{version}-%{release}'
package1 | sed -e 's/\\.el[0-9]//g'", stderr=-1)])
+    self.assertEqual(checked_call_mock.call_args_list, [call("rpm -q --queryformat '%{version}-%{release}'
package1 | sed -e 's/\\.el[0-9]//g'")])
 
   @patch("resource_management.libraries.functions.packages_analyzer.rmf_shell.checked_call")
   @patch.object(OSCheck, "is_in_family")


Mime
View raw message