Ejemplo n.º 1
0
def environment_checker(request):
    node = request.node
    # List of marks for which we will ignore the leftover checker
    marks_to_ignore = [m.mark for m in [deployment, destroy, ignore_leftovers]]
    for mark in node.iter_markers():
        if mark in marks_to_ignore:
            return

    request.addfinalizer(get_status_after_execution)
    get_status_before_execution()
Ejemplo n.º 2
0
def health_checker(request):
    node = request.node
    # Limit the health check for tier4a, tier4b, tier4c
    tier4_marks = ['tier4', 'tier4a', 'tier4b', 'tier4c']
    for mark in node.iter_markers():
        if mark.name in tier4_marks:
            log.info("Checking for Ceph Health OK ")
            try:
                status = ceph_health_check_base()
                if status:
                    log.info("Health check passed")
                    return
            except CephHealthException:
                # skip because ceph is not in good health
                pytest.skip("Ceph Health check failed")