ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject ambari git commit: AMBARI-12022 - Manual Rolling Upgrade Cannot Finalize Because Clients Reset Version On Restart (part2) (jonathanhurley)
Date Sat, 20 Jun 2015 03:19:04 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 7750a9900 -> 0512629a6


AMBARI-12022 - Manual Rolling Upgrade Cannot Finalize Because Clients Reset Version On Restart
(part2) (jonathanhurley)


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

Branch: refs/heads/branch-2.1
Commit: 0512629a6c91c088fb34beab5d715bd4b769bae6
Parents: 7750a99
Author: Jonathan Hurley <jhurley@hortonworks.com>
Authored: Fri Jun 19 23:18:19 2015 -0400
Committer: Jonathan Hurley <jhurley@hortonworks.com>
Committed: Fri Jun 19 23:18:59 2015 -0400

----------------------------------------------------------------------
 .../python/resource_management/TestScript.py    | 40 --------------------
 1 file changed, 40 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0512629a/ambari-agent/src/test/python/resource_management/TestScript.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/test/python/resource_management/TestScript.py b/ambari-agent/src/test/python/resource_management/TestScript.py
index ce73b12..fd31910 100644
--- a/ambari-agent/src/test/python/resource_management/TestScript.py
+++ b/ambari-agent/src/test/python/resource_management/TestScript.py
@@ -110,46 +110,6 @@ class TestScript(TestCase):
     self.assertEqual(Script.structuredOut, {"1": "3", "2": "2"})
 
 
-  @patch.object(Script, 'get_stack_to_component')
-  def test_set_version(self, get_stack_to_component_mock):
-    good_config = {
-      'hostLevelParams': {
-        'stack_name': "HDP",
-        'stack_version': "2.2"
-      },
-      'commandParams': {
-        'version': "2.2.0.0-2041"
-      }
-    }
-    get_stack_to_component_mock.return_value = {"HDP": "kafka-broker"}
-
-    # Testing default workflow
-    with Environment(".", test_mode=True) as env:
-      script = Script()
-      Script.config = good_config
-    resource_dump = pprint.pformat(env.resource_list)
-    self.assertEquals(resource_dump, '[Execute[\'(\'/usr/bin/hdp-select\', \'set\', \'kafka-broker\',
\'2.2.0.0-2041\')\']]')
-
-    # Component does not provide mapping
-    get_stack_to_component_mock.return_value = {}
-
-    with Environment(".", test_mode=True) as env:
-      script = Script()
-      Script.config = good_config
-    resource_dump = pprint.pformat(env.resource_list)
-    self.assertEquals(resource_dump, '[]')
-
-    # Component provided mapping, but configuration is not complete (testing fallback)
-    get_stack_to_component_mock.return_value = {"HDP": "kafka-broker"}
-    bad_config = {}
-
-    with Environment(".", test_mode=True) as env:
-      script = Script()
-      Script.config = bad_config
-    resource_dump = pprint.pformat(env.resource_list)
-    self.assertEquals(resource_dump, '[]')
-
-
   def tearDown(self):
     # enable stdout
     sys.stdout = sys.__stdout__


Mime
View raw message