You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2015/06/20 05:18:41 UTC
ambari git commit: AMBARI-12022 - Manual Rolling Upgrade Cannot
Finalize Because Clients Reset Version On Restart (part2) (jonathanhurley)
Repository: ambari
Updated Branches:
refs/heads/trunk 66c576f1b -> 7e414bbe3
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/7e414bbe
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7e414bbe
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7e414bbe
Branch: refs/heads/trunk
Commit: 7e414bbe30608edb217a24acf1fe706243bcdcd6
Parents: 66c576f
Author: Jonathan Hurley <jh...@hortonworks.com>
Authored: Fri Jun 19 23:18:19 2015 -0400
Committer: Jonathan Hurley <jh...@hortonworks.com>
Committed: Fri Jun 19 23:18:32 2015 -0400
----------------------------------------------------------------------
.../python/resource_management/TestScript.py | 40 --------------------
1 file changed, 40 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/7e414bbe/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__