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"]
def test_perfkey_available(deployment_full): _, status = Deployment(deployment_full).condition assert status.perfkey == Deployment.PerfMap.AVAILABLE
def test_kind(deployment_full): assert Deployment(deployment_full)._kind == "Deployment"
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