ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smoha...@apache.org
Subject ambari git commit: Ambari-10677. apt-get update command updates all list files even if it is expected to update only one (UT fixes)
Date Thu, 23 Apr 2015 17:07:04 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 8779baea9 -> 6fb7ee357


Ambari-10677. apt-get update command updates all list files even if it is expected to update
only one (UT fixes)


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

Branch: refs/heads/trunk
Commit: 6fb7ee357210d69e48f072b6f12ea3a71d7f75cd
Parents: 8779bae
Author: Sumit Mohanty <smohanty@hortonworks.com>
Authored: Thu Apr 23 10:06:06 2015 -0700
Committer: Sumit Mohanty <smohanty@hortonworks.com>
Committed: Thu Apr 23 10:06:06 2015 -0700

----------------------------------------------------------------------
 .../test/python/resource_management/TestRepositoryResource.py  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/6fb7ee35/ambari-agent/src/test/python/resource_management/TestRepositoryResource.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/test/python/resource_management/TestRepositoryResource.py b/ambari-agent/src/test/python/resource_management/TestRepositoryResource.py
index 82a185a..6b94481 100644
--- a/ambari-agent/src/test/python/resource_management/TestRepositoryResource.py
+++ b/ambari-agent/src/test/python/resource_management/TestRepositoryResource.py
@@ -171,7 +171,7 @@ class TestRepositoryResource(TestCase):
       #'apt-get update -qq -o Dir::Etc::sourcelist="sources.list.d/HDP.list" -o APT::Get::List-Cleanup="0"')
       execute_command_item = execute_mock.call_args_list[0][0][0]
 
-      self.assertEqual(checked_call_mock.call_args_list[0][0][0], ['apt-get', 'update', '-qq',
'-o', 'Dir::Etc::sourcelist=sources.list.d/HDP.list', '-o', 'APT::Get::List-Cleanup=0'])
+      self.assertEqual(checked_call_mock.call_args_list[0][0][0], ['apt-get', 'update', '-qq',
'-o', 'Dir::Etc::sourcelist=sources.list.d/HDP.list', '-o', 'Dir::Etc::sourceparts=-', '-o',
'APT::Get::List-Cleanup=0'])
       self.assertEqual(execute_command_item, 'apt-key adv --recv-keys --keyserver keyserver.ubuntu.com
123ABCD')
 
     @patch("resource_management.libraries.providers.repository.checked_call")
@@ -211,7 +211,7 @@ class TestRepositoryResource(TestCase):
       self.assertEqual(copy_item, "call('/etc/apt/sources.list.d/HDP.list', content=StaticFile('/tmp/1.txt'))")
       execute_command_item = execute_mock.call_args_list[0][0][0]
 
-      self.assertEqual(checked_call_mock.call_args_list[0][0][0], ['apt-get', 'update', '-qq',
'-o', 'Dir::Etc::sourcelist=sources.list.d/HDP.list', '-o', 'APT::Get::List-Cleanup=0'])
+      self.assertEqual(checked_call_mock.call_args_list[0][0][0], ['apt-get', 'update', '-qq',
'-o', 'Dir::Etc::sourcelist=sources.list.d/HDP.list', '-o', 'Dir::Etc::sourceparts=-', '-o',
'APT::Get::List-Cleanup=0'])
       self.assertEqual(execute_command_item, 'apt-key adv --recv-keys --keyserver keyserver.ubuntu.com
123ABCD')
 
     @patch.object(tempfile, "NamedTemporaryFile")
@@ -257,7 +257,7 @@ class TestRepositoryResource(TestCase):
           )
           
       self.assertEqual(str(file_mock.call_args), "call('/etc/apt/sources.list.d/HDP.list',
action='delete')")
-      self.assertEqual(execute_mock.call_args[0][0], ['apt-get', 'update', '-qq', '-o', 'Dir::Etc::sourcelist=sources.list.d/HDP.list',
'-o', 'APT::Get::List-Cleanup=0'])
+      self.assertEqual(execute_mock.call_args[0][0], ['apt-get', 'update', '-qq', '-o', 'Dir::Etc::sourcelist=sources.list.d/HDP.list',
'-o', 'Dir::Etc::sourceparts=-', '-o', 'APT::Get::List-Cleanup=0'])
 
     @patch("os.path.isfile", new=MagicMock(return_value=False))
     @patch.object(System, "os_family", new='ubuntu')


Mime
View raw message