Skip to content

Commit bb9e393

Browse files
authored
Merge pull request kubernetes#129110 from soltysh/deployment_patch_status
test: deployment patch status test should check the modified fields
2 parents 28ad751 + 247555c commit bb9e393

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

test/e2e/apps/deployment.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -396,9 +396,6 @@ var _ = SIGDescribe("Deployment", func() {
396396

397397
ginkgo.By("patching the DeploymentStatus")
398398
deploymentStatusPatch, err := json.Marshal(map[string]interface{}{
399-
"metadata": map[string]interface{}{
400-
"labels": map[string]string{"test-deployment": "patched-status"},
401-
},
402399
"status": map[string]interface{}{
403400
"readyReplicas": testDeploymentNoReplicas,
404401
"availableReplicas": testDeploymentAvailableReplicas,
@@ -416,7 +413,9 @@ var _ = SIGDescribe("Deployment", func() {
416413
case watch.Modified:
417414
if deployment, ok := event.Object.(*appsv1.Deployment); ok {
418415
found := deployment.ObjectMeta.Name == testDeployment.Name &&
419-
deployment.ObjectMeta.Labels["test-deployment-static"] == "true"
416+
deployment.Status.ReadyReplicas == testDeploymentNoReplicas &&
417+
deployment.Status.AvailableReplicas == testDeploymentAvailableReplicas
418+
420419
return found, nil
421420
}
422421
default:

0 commit comments

Comments
 (0)