Пример #1
0
def test_parse_multi(expected_initialized, expected_scheduled,
                     expected_containersready, expected_ready, string_table):
    section = k8s_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 = k8s_pod_conditions.parse(string_table)
    assert list(k8s_pod_conditions.discovery(parsed))
Пример #3
0
def test_parse_fails_when_all_conditions_empty(string_table):
    with pytest.raises(ValidationError):
        k8s_pod_conditions.parse(string_table)
Пример #4
0
def test_parse(string_table):
    section = k8s_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 k8s_pod_conditions.parse(string_table)