Exemple #1
0
def test_overview_limits_contained(usage_section, check_result,
                                   resources_section) -> None:
    overview_limits_ignored = kube_resources.count_overview(
        resources_section, "limit")
    results = [r for r in check_result if isinstance(r, Result)]
    limits_results = [r for r in results if "Limit" in r.summary]
    assert len(limits_results) == 1
    assert [r for r in results
            if overview_limits_ignored in r.summary] == limits_results
Exemple #2
0
def test_overview_requests_contained_no_usage_section(
        usage_section, check_result, resources_section) -> None:
    overview_requests_ignored = kube_resources.count_overview(
        resources_section, "request")
    results = [r for r in check_result if isinstance(r, Result)]
    requests_results = [r for r in results if "Request" in r.summary]
    assert len(requests_results) == 1
    assert [r for r in results
            if overview_requests_ignored in r.summary] == requests_results
Exemple #3
0
def overview_requests_ignored(resources_section):
    return kube_resources.count_overview(resources_section, "request")
Exemple #4
0
def overview_limits_ignored(resources_section):
    return kube_resources.count_overview(resources_section, "limit")