Пример #1
0
def test_stop_media_server():
    attach_to_application()
    client = ssh_connect.start()
    ssh_connect.execute_command(client, STOP_MEDIASERVER, passwd_required=True)
    with pytest.raises(VideoStreamingError):
        waitForObject('Settings')
    ssh_connect.execute_command(client,
                                START_MEDIASERVER,
                                passwd_required=True)
    time.sleep(10)
    waitForObject('Settings')
Пример #2
0
def test_port_busy_another_process():
    client = ssh_connect.start()
    ssh_connect.execute_command(client, STOP, passwd_required=True)
    output = ssh_connect.execute_command(client, CURRENT_DATE)
    curr_time = output.read()[:-2]
    client.exec_command(START_TCP, get_pty=False)
    ssh_connect.execute_command(client, START, passwd_required=True)
    time.sleep(SLEEP)
    logs = ssh_connect.execute_command(client, RETRIEVE_LOG)
    process_time = logs.read().split('\n')[-2][0:12]
    find_process_on_port_and_kill(client)
    time.sleep(SLEEP)
    ssh_connect.execute_command(client, START, passwd_required=True)
    attach_to_application()
    assert curr_time == process_time
Пример #3
0
def test_check_exception_after_stop_vhat():
    client = ssh_connect.start()
    ssh_connect.execute_command(client, STOP, passwd_required=True)
    with pytest.raises(RuntimeError):
        attach_to_application()
    ssh_connect.execute_command(client, START, passwd_required=True)
Пример #4
0
def test_recovery():
    client = ssh_connect.start()
    ssh_connect.execute_command(client, KILLALL, passwd_required=True)
    attach_to_application()
Пример #5
0
def attach_to_app():
    sync = hmi.attach_to_application()
    # TODO delete line below after implementation of VHAT-1845
    params_handler.__HOST = sync.host
    yield sync