Example #1
0
def test_log_multiple_apps():
    package_install('marathon', True,
                    ['--options=tests/data/service/marathon-user.json'])
    package_install('marathon', True, [
        '--options=tests/data/service/marathon-user2.json',
        '--app-id=marathon-user2'
    ])
    wait_for_service('marathon-user', number_of_services=2)

    try:
        stderr = (b'Error: multiple marathon apps found for service name ' +
                  b'[marathon-user]: [/marathon-user, /marathon-user2]\n')
        assert_command(['dcos', 'service', 'log', 'marathon-user'],
                       returncode=1,
                       stderr=stderr)
    finally:
        # We can't use `dcos package uninstall`. The services have the same
        # name. Manually remove the dcos services.
        remove_app('marathon-user')
        remove_app('marathon-user2')
        for service in get_services():
            if service['name'] == 'marathon-user':
                service_shutdown(service['id'])

        delete_zk_node('universe')
Example #2
0
def teardown_module():
    for app_ in INIT_APPS:
        remove_app(app_[1])