def test_two_clusters(self, action_name, cluster_with_components: Cluster, provider: Provider): """ Test that component actions on host works fine on two clusters """ second_cluster = cluster_with_components.bundle().cluster_prototype( ).cluster_create(name="Second cluster") service_on_first_cluster = cluster_with_components.service_add( name=FIRST_SERVICE) component_on_first_cluster = service_on_first_cluster.component( name=FIRST_COMPONENT) service_on_second_cluster = second_cluster.service_add( name=FIRST_SERVICE) component_on_second_cluster = service_on_second_cluster.component( name=FIRST_COMPONENT) first_host = provider.host_create("host_in_first_cluster") second_host = provider.host_create("host_in_second_cluster") cluster_with_components.host_add(first_host) second_cluster.host_add(second_host) cluster_with_components.hostcomponent_set( (first_host, component_on_first_cluster)) second_cluster.hostcomponent_set( (second_host, component_on_second_cluster)) action_in_object_is_present(action_name, first_host) action_in_object_is_present(action_name, second_host) run_host_action_and_assert_result(first_host, action_name, status="success") run_host_action_and_assert_result(second_host, action_name, status="success")
def test_two_clusters(self, action_name, cluster: Cluster, provider: Provider): """ Test that cluster actions on host works fine on two clusters """ second_cluster = cluster.bundle().cluster_prototype().cluster_create( name="Second cluster") first_host = provider.host_create("host_in_first_cluster") second_host = provider.host_create("host_in_second_cluster") cluster.host_add(first_host) second_cluster.host_add(second_host) action_in_object_is_present(action_name, first_host) action_in_object_is_present(action_name, second_host) run_host_action_and_assert_result(first_host, action_name, status="success") run_host_action_and_assert_result(second_host, action_name, status="success")