def verify_domain_running(provider, domain): refresh(provider) wait_for(lambda: domain.is_running(), delay=DELAY, num_sec=NUM_SEC, message='Domain {} must be running'.format(domain.name), fail_func=lambda: refresh(provider)) for server_group in domain_server_groups(provider, domain): verify_server_group_running(provider, server_group)
def test_server_group_reload(provider, main_server_group): """Tests domain mode server group reload operation on UI Steps: * Invokes 'Reload Server Group' toolbar operation * Waits for some time * Checks that server group's server status is running in UI, in DB and in MGMT. """ verify_server_group_running(provider, main_server_group) main_server_group.reload_server_group() verify_server_group_running(provider, main_server_group)
def test_server_group_restart(provider, main_server_group): """Tests domain server group restart operation on UI Steps: * Invokes 'Restart Server Group' toolbar operation * Waits for some time * Checks that all servers in that server group have status running in UI, in DB and in MGMT. """ verify_server_group_running(provider, main_server_group) main_server_group.restart_server_group() verify_server_group_running(provider, main_server_group)
def test_server_group_stop_start(provider, main_server_group): """Tests domain mode server group stop/start operation on UI Steps: * Invokes 'Stop Server Group' toolbar operation * Checks that server status is stopped in UI, in DB and in MGMT. * Invokes 'Start Server Group' toolbar operation * Waits for some time * Checks that server group's server status is running in UI, in DB and in MGMT. """ verify_server_group_running(provider, main_server_group) main_server_group.stop_server_group() verify_server_group_stopped(provider, main_server_group) main_server_group.start_server_group() verify_server_group_running(provider, main_server_group)
def test_server_group_suspend_resume(provider, main_server_group): """Tests domain mode server group suspend/resume operation on UI Steps: * Invokes 'Suspend Server Group' toolbar operation * Checks that server group's servers status is not running in UI, in DB and in MGMT. * Invokes 'Resume Server Group' toolbar operation * Waits for some time * Checks that server group's server status is running in UI, in DB and in MGMT. """ verify_server_group_running(provider, main_server_group) main_server_group.suspend_server_group() verify_server_group_suspended(provider, main_server_group) main_server_group.resume_server_group() verify_server_group_running(provider, main_server_group)
def verify_domain_running(provider, domain): for server_group in domain_server_groups(provider, domain): verify_server_group_running(provider, server_group)