Exemplo n.º 1
0
def test_pod_health_check():
    """Tests that health checks work for pods."""

    pod_def = pods.ports_pod()
    pod_id = pod_def['id']

    client = marathon.create_client()
    client.add_pod(pod_def)
    common.deployment_wait(service_id=pod_id)

    tasks = common.get_pod_tasks(pod_id)
    for task in tasks:
        health = common.running_task_status(task['statuses'])['healthy']
        assert health, "One of the pod's tasks (%s) is unhealthy" % (task['name'])
Exemplo n.º 2
0
def test_pod_health_check():
    """Tests that health checks work for pods."""

    pod_def = pods.ports_pod()
    pod_id = pod_def['id']

    client = marathon.create_client()
    client.add_pod(pod_def)
    common.deployment_wait(service_id=pod_id)

    tasks = common.get_pod_tasks(pod_id)
    for task in tasks:
        health = common.running_task_status(task['statuses'])['healthy']
        assert health, "One of the pod's tasks (%s) is unhealthy" % (task['name'])
Exemplo n.º 3
0
 def assert_all_pods_healthy(pod_id):
     tasks = common.get_pod_tasks(pod_id)
     for task in tasks:
         health = common.running_task_status(task['statuses'])['healthy']
         assert health, "One of the pod's tasks (%s) is unhealthy" % (task['name'])
Exemplo n.º 4
0
 def assert_all_pods_healthy(pod_id):
     tasks = common.get_pod_tasks(pod_id)
     for task in tasks:
         health = common.running_task_status(task['statuses'])['healthy']
         assert health, "One of the pod's tasks (%s) is unhealthy" % (task['name'])