예제 #1
0
def test_parse_multi(expected_initialized, expected_scheduled,
                     expected_containersready, expected_ready, string_table):
    section = kube_pod_conditions.parse(string_table)
    assert section.initialized == expected_initialized
    assert section.scheduled == expected_scheduled
    assert section.containersready == expected_containersready
    assert section.ready == expected_ready
예제 #2
0
def test_discovery_returns_an_iterable(string_table):
    parsed = kube_pod_conditions.parse(string_table)
    assert list(kube_pod_conditions.discovery(parsed))
예제 #3
0
def test_parse_fails_when_all_conditions_empty(string_table):
    with pytest.raises(ValidationError):
        kube_pod_conditions.parse(string_table)
예제 #4
0
def test_parse(string_table):
    section = kube_pod_conditions.parse(string_table)
    assert section.initialized == ready()
    assert section.scheduled == ready()
    assert section.containersready == ready()
    assert section.ready == ready()
예제 #5
0
def section(string_table):
    return kube_pod_conditions.parse(string_table)