[
https://issues.apache.org/jira/browse/AMBARI-3311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13774657#comment-13774657
]
Andrew Onischuk commented on AMBARI-3311:
-----------------------------------------
Here I've added unit-tests for the clusterModel public methods, in future we
should add such a tests to other models.
I've added a tests into a new file TestClusterModel, it now contains such a
tests:
{code}
test_get_service
test_get_all_services
test_get_all_hosts
test_get_host
test_get_global_config
test_get_core_site_config
test_get_hdfs_site_config
test_get_mapred_site_config
test_update_global_config
test_update_core_site_config
test_update_hdfs_site_config
test_update_mapred_site_config
test_create_services
test_create_service_components
test_create_service_component
test_create_hosts
test_create_host
test_delete_host
test_start_all_services
test_stop_all_services
test_install_all_services
test_add_config
test_create_config
{code}
When testing get methods, we mock a real server response with response from
file, When testing post methods we assert the info we should be passed to
server (request, http method, url)
{code}
----------------------------------------------------------------------
Ran 29 tests in 1.024s
OK
{code}
> Ambari-Client create unit test for the methods of ClusterModel
> --------------------------------------------------------------
>
> Key: AMBARI-3311
> URL: https://issues.apache.org/jira/browse/AMBARI-3311
> Project: Ambari
> Issue Type: Task
> Reporter: Andrew Onischuk
> Assignee: Andrew Onischuk
> Fix For: 1.4.1
>
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira