Example #1
0
def test_replicas(deployment_full):
    replica_data = deployment_full["status"]
    replicas = Deployment(deployment_full).replicas

    assert replicas.total == replica_data["replicas"]
    assert replicas.ready == replica_data["readyReplicas"]
    assert replicas.available == replica_data["availableReplicas"]
    assert replicas.updated == replica_data["updatedReplicas"]
Example #2
0
def test_perfkey_available(deployment_full):
    _, status = Deployment(deployment_full).condition
    assert status.perfkey == Deployment.PerfMap.AVAILABLE
Example #3
0
def test_kind(deployment_full):
    assert Deployment(deployment_full)._kind == "Deployment"
Example #4
0
def test_perfkey_degraded(deployment_full, deployment_replicas_degraded):
    deployment_full["status"].update(deployment_replicas_degraded)
    _, status = Deployment(deployment_full).condition
    assert status.perfkey == Deployment.PerfMap.DEGRADED