Exemplo n.º 1
0
def wait_for_marathon_and_cleanup():
    print("entering wait_for_marathon_and_cleanup fixture")
    shakedown.wait_for_service_endpoint('marathon', timedelta(minutes=5).total_seconds())
    yield
    shakedown.wait_for_service_endpoint('marathon', timedelta(minutes=5).total_seconds())
    common.clean_up_marathon()
    print("exiting wait_for_marathon_and_cleanup fixture")
Exemplo n.º 2
0
def parent_group(request):
    """ Fixture which yields a temporary marathon parent group can be used to place apps/pods within the test
    function. Parent group will be removed after the test. Group name is equal to the test function name with
    underscores replaced by dashes.
    """
    group = '/{}'.format(request.function.__name__).replace('_', '-')
    yield group
    common.clean_up_marathon(parent_group=group)
Exemplo n.º 3
0
def parent_group(request):
    """ Fixture which yields a temporary marathon parent group can be used to place apps/pods within the test
    function. Parent group will be removed after the test. Group name is equal to the test function name with
    underscores replaced by dashes.
    """
    group = '/{}'.format(request.function.__name__).replace('_', '-')
    yield group
    common.clean_up_marathon(parent_group=group)
Exemplo n.º 4
0
def setup_module(module):
    # When the cluster is starting, it might happen that there is some delay in:
    # - marathon leader registration with mesos
    # - admin router refreshing cache (every 30s)
    # We should not start our tests before marathon is accessible through service endpoint.
    wait_for_service_endpoint('marathon', timedelta(minutes=5).total_seconds(), path="ping")

    common.cluster_info()
    common.clean_up_marathon()
Exemplo n.º 5
0
def wait_for_marathon_and_cleanup():
    print("entering wait_for_marathon_and_cleanup fixture")
    shakedown.wait_for_service_endpoint('marathon',
                                        timedelta(minutes=5).total_seconds())
    yield
    shakedown.wait_for_service_endpoint('marathon',
                                        timedelta(minutes=5).total_seconds())
    common.clean_up_marathon()
    print("exiting wait_for_marathon_and_cleanup fixture")
Exemplo n.º 6
0
def setup_module(module):
    # When the cluster is starting, it might happen that there is some delay in:
    # - marathon leader registration with mesos
    # - admin router refreshing cache (every 30s)
    # We should not start our tests before marathon is accessible through service endpoint.
    wait_for_service_endpoint('marathon', timedelta(minutes=5).total_seconds(), path="ping")

    common.cluster_info()
    common.clean_up_marathon()
Exemplo n.º 7
0
def wait_for_marathon_and_cleanup():
    wait_for_service_endpoint('marathon',
                              timedelta(minutes=5).total_seconds(),
                              path="ping")
    yield
    wait_for_service_endpoint('marathon',
                              timedelta(minutes=5).total_seconds(),
                              path="ping")
    common.clean_up_marathon()
Exemplo n.º 8
0
def wait_for_marathon_user_and_cleanup():
    wait_for_service_endpoint('marathon-user',
                              timedelta(minutes=5).total_seconds(),
                              path="ping")
    with marathon_on_marathon() as client:
        yield
        wait_for_service_endpoint('marathon-user',
                                  timedelta(minutes=5).total_seconds(),
                                  path="ping")
        common.clean_up_marathon(client)
Exemplo n.º 9
0
def wait_for_marathon_user_and_cleanup():
    common.wait_for_service_endpoint('marathon-user',
                                     timedelta(minutes=5).total_seconds(),
                                     path="ping")
    with shakedown.marathon_on_marathon():
        yield
        common.wait_for_service_endpoint('marathon-user',
                                         timedelta(minutes=5).total_seconds(),
                                         path="ping")
        common.clean_up_marathon()
Exemplo n.º 10
0
def teardown_module(module):
    with shakedown.marathon_on_marathon():
        try:
            common.clean_up_marathon()
        except:
            pass

    shakedown.uninstall_package_and_wait('marathon')
    shakedown.delete_zk_node('universe/marathon-user')

    # Remove everything from root marathon
    common.clean_up_marathon()
Exemplo n.º 11
0
def teardown_module(module):
    with shakedown.marathon_on_marathon():
        try:
            common.clean_up_marathon()
        except Exception:
            pass

    shakedown.uninstall_package_and_wait('marathon')
    shakedown.delete_zk_node('universe/marathon-user')

    # Remove everything from root marathon
    common.clean_up_marathon()
def teardown_module(module):
    with marathon_on_marathon() as client:
        try:
            common.clean_up_marathon(client=client)
        except Exception:
            pass

    uninstall_package_and_wait('marathon')
    delete_zk_node('universe/marathon-user')

    # Remove everything from root marathon
    common.clean_up_marathon()
def teardown_module(module):
    with marathon_on_marathon() as client:
        try:
            common.clean_up_marathon(client=client)
        except Exception:
            pass

    uninstall_package_and_wait('marathon')
    delete_zk_node('universe/marathon-user')

    # Remove everything from root marathon
    common.clean_up_marathon()
Exemplo n.º 14
0
def wait_for_marathon_user_and_cleanup():
    wait_for_service_endpoint('marathon-user', timedelta(minutes=5).total_seconds(), path="ping")
    with marathon_on_marathon() as client:
        yield
        wait_for_service_endpoint('marathon-user', timedelta(minutes=5).total_seconds(), path="ping")
        common.clean_up_marathon(client)
Exemplo n.º 15
0
def wait_for_marathon_and_cleanup():
    wait_for_service_endpoint('marathon', timedelta(minutes=5).total_seconds(), path="ping")
    yield
    wait_for_service_endpoint('marathon', timedelta(minutes=5).total_seconds(), path="ping")
    common.clean_up_marathon()
Exemplo n.º 16
0
def teardown_module(module):
    common.clean_up_marathon()
Exemplo n.º 17
0
def setup_module(module):
    common.cluster_info()
    common.clean_up_marathon()
Exemplo n.º 18
0
def setup_module(module):
    common.ensure_mom()
    common.cluster_info()
    with shakedown.marathon_on_marathon():
        common.clean_up_marathon()
Exemplo n.º 19
0
def teardown_module(module):
    common.clean_up_marathon()
def setup_module(module):
    common.ensure_mom()
    common.cluster_info()
    with marathon_on_marathon() as client:
        common.clean_up_marathon(client=client)
Exemplo n.º 21
0
def setup_module(module):
    common.ensure_mom()
    common.cluster_info()
    with shakedown.marathon_on_marathon():
        common.clean_up_marathon()
def setup_module(module):
    common.ensure_mom()
    common.cluster_info()
    with marathon_on_marathon() as client:
        common.clean_up_marathon(client=client)
Exemplo n.º 23
0
def setup_module(module):
    common.cluster_info()
    common.clean_up_marathon()