Repository: ambari Updated Branches: refs/heads/branch-windows-dev f2bed3b75 -> e0e96aa04
AMBARI-8024. ambari-server unit test failures: "Index out of range" error. (Florian Barca via yusaku) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e0e96aa0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e0e96aa0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e0e96aa0 Branch: refs/heads/branch-windows-dev Commit: e0e96aa04e315cf715d936220a2fe39a7cd0a0aa Parents: f2bed3b Author: Yusaku Sako <[email protected]> Authored: Thu Oct 30 13:39:50 2014 -0700 Committer: Yusaku Sako <[email protected]> Committed: Thu Oct 30 13:39:50 2014 -0700 ---------------------------------------------------------------------- ambari-agent/src/test/python/ambari_agent/TestAlerts.py | 1 + .../src/test/python/resource_management/TestContentSources.py | 2 +- .../src/test/python/resource_management/TestDirectoryResource.py | 2 +- .../test/python/resource_management/TestExecuteHadoopResource.py | 2 ++ .../src/test/python/resource_management/TestExecuteResource.py | 1 + .../python/resource_management/TestMonitorWebserverResource.py | 1 + .../src/test/python/resource_management/TestSubstituteVars.py | 2 ++ .../test/python/stacks/1.3.2/hooks/before-ANY/test_before_any.py | 2 +- .../python/stacks/1.3.2/hooks/before-START/test_before_start.py | 2 +- .../test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py | 2 +- .../python/stacks/2.0.6/hooks/before-START/test_before_start.py | 2 +- 11 files changed, 13 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/e0e96aa0/ambari-agent/src/test/python/ambari_agent/TestAlerts.py ---------------------------------------------------------------------- diff --git a/ambari-agent/src/test/python/ambari_agent/TestAlerts.py b/ambari-agent/src/test/python/ambari_agent/TestAlerts.py index 6c5cb4d..160c5ce 100644 --- a/ambari-agent/src/test/python/ambari_agent/TestAlerts.py +++ b/ambari-agent/src/test/python/ambari_agent/TestAlerts.py @@ -18,6 +18,7 @@ See the License for the specific language governing permissions and limitations under the License. ''' +from stacks.utils.RMFTestCase import * import os import sys from ambari_agent.AlertSchedulerHandler import AlertSchedulerHandler http://git-wip-us.apache.org/repos/asf/ambari/blob/e0e96aa0/ambari-agent/src/test/python/resource_management/TestContentSources.py ---------------------------------------------------------------------- diff --git a/ambari-agent/src/test/python/resource_management/TestContentSources.py b/ambari-agent/src/test/python/resource_management/TestContentSources.py index 1c5e8a8..d09df44 100644 --- a/ambari-agent/src/test/python/resource_management/TestContentSources.py +++ b/ambari-agent/src/test/python/resource_management/TestContentSources.py @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. ''' - +from stacks.utils.RMFTestCase import * from unittest import TestCase from mock.mock import patch, MagicMock http://git-wip-us.apache.org/repos/asf/ambari/blob/e0e96aa0/ambari-agent/src/test/python/resource_management/TestDirectoryResource.py ---------------------------------------------------------------------- diff --git a/ambari-agent/src/test/python/resource_management/TestDirectoryResource.py b/ambari-agent/src/test/python/resource_management/TestDirectoryResource.py index 866486e..5a63891 100644 --- a/ambari-agent/src/test/python/resource_management/TestDirectoryResource.py +++ b/ambari-agent/src/test/python/resource_management/TestDirectoryResource.py @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. ''' - +from stacks.utils.RMFTestCase import * from unittest import TestCase from mock.mock import patch, MagicMock import os http://git-wip-us.apache.org/repos/asf/ambari/blob/e0e96aa0/ambari-agent/src/test/python/resource_management/TestExecuteHadoopResource.py ---------------------------------------------------------------------- diff --git a/ambari-agent/src/test/python/resource_management/TestExecuteHadoopResource.py b/ambari-agent/src/test/python/resource_management/TestExecuteHadoopResource.py index d2ef71c..f5308d1 100644 --- a/ambari-agent/src/test/python/resource_management/TestExecuteHadoopResource.py +++ b/ambari-agent/src/test/python/resource_management/TestExecuteHadoopResource.py @@ -15,6 +15,8 @@ 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. ''' + +from stacks.utils.RMFTestCase import * import os from unittest import TestCase http://git-wip-us.apache.org/repos/asf/ambari/blob/e0e96aa0/ambari-agent/src/test/python/resource_management/TestExecuteResource.py ---------------------------------------------------------------------- diff --git a/ambari-agent/src/test/python/resource_management/TestExecuteResource.py b/ambari-agent/src/test/python/resource_management/TestExecuteResource.py index 93d7064..db236dc 100644 --- a/ambari-agent/src/test/python/resource_management/TestExecuteResource.py +++ b/ambari-agent/src/test/python/resource_management/TestExecuteResource.py @@ -16,6 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. ''' +from stacks.utils.RMFTestCase import * from unittest import TestCase from mock.mock import patch, MagicMock, call http://git-wip-us.apache.org/repos/asf/ambari/blob/e0e96aa0/ambari-agent/src/test/python/resource_management/TestMonitorWebserverResource.py ---------------------------------------------------------------------- diff --git a/ambari-agent/src/test/python/resource_management/TestMonitorWebserverResource.py b/ambari-agent/src/test/python/resource_management/TestMonitorWebserverResource.py index 533ecaa..d5b2c42 100644 --- a/ambari-agent/src/test/python/resource_management/TestMonitorWebserverResource.py +++ b/ambari-agent/src/test/python/resource_management/TestMonitorWebserverResource.py @@ -16,6 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. ''' +from stacks.utils.RMFTestCase import * from unittest import TestCase from mock.mock import patch, MagicMock from resource_management import * http://git-wip-us.apache.org/repos/asf/ambari/blob/e0e96aa0/ambari-agent/src/test/python/resource_management/TestSubstituteVars.py ---------------------------------------------------------------------- diff --git a/ambari-agent/src/test/python/resource_management/TestSubstituteVars.py b/ambari-agent/src/test/python/resource_management/TestSubstituteVars.py index b3623cd..9e42f92 100644 --- a/ambari-agent/src/test/python/resource_management/TestSubstituteVars.py +++ b/ambari-agent/src/test/python/resource_management/TestSubstituteVars.py @@ -17,6 +17,8 @@ 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. ''' + +from stacks.utils.RMFTestCase import * from unittest import TestCase, main from resource_management.libraries.functions.substitute_vars import substitute_vars http://git-wip-us.apache.org/repos/asf/ambari/blob/e0e96aa0/ambari-server/src/test/python/stacks/1.3.2/hooks/before-ANY/test_before_any.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/1.3.2/hooks/before-ANY/test_before_any.py b/ambari-server/src/test/python/stacks/1.3.2/hooks/before-ANY/test_before_any.py index 2d4735a..003d036 100644 --- a/ambari-server/src/test/python/stacks/1.3.2/hooks/before-ANY/test_before_any.py +++ b/ambari-server/src/test/python/stacks/1.3.2/hooks/before-ANY/test_before_any.py @@ -20,7 +20,7 @@ limitations under the License. from stacks.utils.RMFTestCase import * from mock.mock import MagicMock, call, patch -from resource_management import * +from resource_management import Hook @patch.object(Hook, "run_custom_hook", new = MagicMock()) class TestHookBeforeInstall(RMFTestCase): http://git-wip-us.apache.org/repos/asf/ambari/blob/e0e96aa0/ambari-server/src/test/python/stacks/1.3.2/hooks/before-START/test_before_start.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/1.3.2/hooks/before-START/test_before_start.py b/ambari-server/src/test/python/stacks/1.3.2/hooks/before-START/test_before_start.py index 92227c7..f81e4fd 100644 --- a/ambari-server/src/test/python/stacks/1.3.2/hooks/before-START/test_before_start.py +++ b/ambari-server/src/test/python/stacks/1.3.2/hooks/before-START/test_before_start.py @@ -20,7 +20,7 @@ limitations under the License. from stacks.utils.RMFTestCase import * from mock.mock import MagicMock, call, patch -from resource_management import * +from resource_management import Hook @patch("os.path.exists", new = MagicMock(return_value=True)) @patch.object(Hook, "run_custom_hook") http://git-wip-us.apache.org/repos/asf/ambari/blob/e0e96aa0/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py index 5d4d3f5..afbd3b4 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py +++ b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py @@ -20,7 +20,7 @@ limitations under the License. from stacks.utils.RMFTestCase import * from mock.mock import MagicMock, call, patch -from resource_management import * +from resource_management import Hook @patch.object(Hook, "run_custom_hook", new = MagicMock()) class TestHookBeforeInstall(RMFTestCase): http://git-wip-us.apache.org/repos/asf/ambari/blob/e0e96aa0/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py index 4cf314f..3b2bf5c 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py +++ b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py @@ -20,7 +20,7 @@ limitations under the License. from stacks.utils.RMFTestCase import * from mock.mock import MagicMock, call, patch -from resource_management import * +from resource_management import Hook @patch("os.path.exists", new = MagicMock(return_value=True)) @patch.object(Hook, "run_custom_hook", new = MagicMock())
