mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-11 21:12:07 +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")
|
ginkgo.By("patching the DeploymentStatus")
|
||||||
deploymentStatusPatch, err := json.Marshal(map[string]interface{}{
|
deploymentStatusPatch, err := json.Marshal(map[string]interface{}{
|
||||||
"metadata": map[string]interface{}{
|
|
||||||
"labels": map[string]string{"test-deployment": "patched-status"},
|
|
||||||
},
|
|
||||||
"status": map[string]interface{}{
|
"status": map[string]interface{}{
|
||||||
"readyReplicas": testDeploymentNoReplicas,
|
"readyReplicas": testDeploymentNoReplicas,
|
||||||
"availableReplicas": testDeploymentAvailableReplicas,
|
"availableReplicas": testDeploymentAvailableReplicas,
|
||||||
@ -416,7 +413,9 @@ var _ = SIGDescribe("Deployment", func() {
|
|||||||
case watch.Modified:
|
case watch.Modified:
|
||||||
if deployment, ok := event.Object.(*appsv1.Deployment); ok {
|
if deployment, ok := event.Object.(*appsv1.Deployment); ok {
|
||||||
found := deployment.ObjectMeta.Name == testDeployment.Name &&
|
found := deployment.ObjectMeta.Name == testDeployment.Name &&
|
||||||
deployment.ObjectMeta.Labels["test-deployment-static"] == "true"
|
deployment.Status.ReadyReplicas == testDeploymentNoReplicas &&
|
||||||
|
deployment.Status.AvailableReplicas == testDeploymentAvailableReplicas
|
||||||
|
|
||||||
return found, nil
|
return found, nil
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user