You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ma...@apache.org on 2013/03/04 04:44:01 UTC
svn commit: r1452178 - in /incubator/ambari/trunk: CHANGES.txt
ambari-agent/src/main/upgrade_scripts/
ambari-agent/src/main/upgrade_scripts/stub
ambari-agent/src/test/python/TestActionQueue.py
ambari-agent/src/test/python/TestUpgradeExecutor.py
Author: mahadev
Date: Mon Mar 4 03:44:01 2013
New Revision: 1452178
URL: http://svn.apache.org/r1452178
Log:
AMBARI-1547. Fix ambari agent test cases that are failing due to missing directory. (mahadev)
Added:
incubator/ambari/trunk/ambari-agent/src/main/upgrade_scripts/
incubator/ambari/trunk/ambari-agent/src/main/upgrade_scripts/stub
Modified:
incubator/ambari/trunk/CHANGES.txt
incubator/ambari/trunk/ambari-agent/src/test/python/TestActionQueue.py
incubator/ambari/trunk/ambari-agent/src/test/python/TestUpgradeExecutor.py
Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1452178&r1=1452177&r2=1452178&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Mon Mar 4 03:44:01 2013
@@ -712,6 +712,9 @@ Trunk (unreleased changes):
AMBARI-1299. Bootstrap can hang indefinitely. (mahadev)
+ AMBARI-1547. Fix ambari agent test cases that are failing due to missing
+ directory. (mahadev)
+
AMBARI-1.2.0 branch:
INCOMPATIBLE CHANGES
Added: incubator/ambari/trunk/ambari-agent/src/main/upgrade_scripts/stub
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/upgrade_scripts/stub?rev=1452178&view=auto
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/upgrade_scripts/stub (added)
+++ incubator/ambari/trunk/ambari-agent/src/main/upgrade_scripts/stub Mon Mar 4 03:44:01 2013
@@ -0,0 +1,21 @@
+#!/usr/bin/env python2.6
+
+'''
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+'''
+
+Will be replaced with a real folder
\ No newline at end of file
Modified: incubator/ambari/trunk/ambari-agent/src/test/python/TestActionQueue.py
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/test/python/TestActionQueue.py?rev=1452178&r1=1452177&r2=1452178&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/test/python/TestActionQueue.py (original)
+++ incubator/ambari/trunk/ambari-agent/src/test/python/TestActionQueue.py Mon Mar 4 03:44:01 2013
@@ -136,7 +136,7 @@ class TestActionQueue(TestCase):
self.assertTrue(executeCommand_method.called)
self.assertEquals(queue.resultQueue.qsize(), 1)
returned_result = queue.resultQueue.get()
- self.assertIs(returned_result[1], result[0])
+ self.assertTrue(returned_result[1] is result[0])
@patch.object(UpgradeExecutor, "perform_stack_upgrade")
Modified: incubator/ambari/trunk/ambari-agent/src/test/python/TestUpgradeExecutor.py
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/test/python/TestUpgradeExecutor.py?rev=1452178&r1=1452177&r2=1452178&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/test/python/TestUpgradeExecutor.py (original)
+++ incubator/ambari/trunk/ambari-agent/src/test/python/TestUpgradeExecutor.py Mon Mar 4 03:44:01 2013
@@ -51,7 +51,7 @@ class TestUpgradeExecutor(TestCase):
'component' : 'HDFS'
}
result = executor.perform_stack_upgrade(command, 'tmpout', 'tmperr')
- self.assertIn('matches current stack version', result['stdout'])
+ self.assertTrue('matches current stack version' in result['stdout'])
self.assertFalse(write_stack_version_method.called)
# Checking unsupported update
write_stack_version_method.reset()
@@ -64,7 +64,7 @@ class TestUpgradeExecutor(TestCase):
}
isdir_method.return_value = False
result = executor.perform_stack_upgrade(command, 'tmpout', 'tmperr')
- self.assertIn('not supported', result['stderr'])
+ self.assertTrue('not supported' in result['stderr'])
self.assertFalse(write_stack_version_method.called)
# Checking successful result
write_stack_version_method.reset()