mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 03:03:59 +00:00
Merge pull request #129110 from soltysh/deployment_patch_status
test: deployment patch status test should check the modified fields
This commit is contained in:
commit
bb9e393fc3
@ -396,9 +396,6 @@ var _ = SIGDescribe("Deployment", func() {
|
||||
|
||||
ginkgo.By("patching the DeploymentStatus")
|
||||
deploymentStatusPatch, err := json.Marshal(map[string]interface{}{
|
||||
"metadata": map[string]interface{}{
|
||||
"labels": map[string]string{"test-deployment": "patched-status"},
|
||||
},
|
||||
"status": map[string]interface{}{
|
||||
"readyReplicas": testDeploymentNoReplicas,
|
||||
"availableReplicas": testDeploymentAvailableReplicas,
|
||||
@ -416,7 +413,9 @@ var _ = SIGDescribe("Deployment", func() {
|
||||
case watch.Modified:
|
||||
if deployment, ok := event.Object.(*appsv1.Deployment); ok {
|
||||
found := deployment.ObjectMeta.Name == testDeployment.Name &&
|
||||
deployment.ObjectMeta.Labels["test-deployment-static"] == "true"
|
||||
deployment.Status.ReadyReplicas == testDeploymentNoReplicas &&
|
||||
deployment.Status.AvailableReplicas == testDeploymentAvailableReplicas
|
||||
|
||||
return found, nil
|
||||
}
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user