Merge pull request #118840 from AhmedGrati/fix-deployment-patch-e2e-test
fix: update deployment e2e tests
This commit is contained in:
commit
a374d893f0
@ -194,6 +194,7 @@ var _ = SIGDescribe("Deployment", func() {
|
|||||||
testDeploymentDefaultReplicas := int32(2)
|
testDeploymentDefaultReplicas := int32(2)
|
||||||
testDeploymentMinimumReplicas := int32(1)
|
testDeploymentMinimumReplicas := int32(1)
|
||||||
testDeploymentNoReplicas := int32(0)
|
testDeploymentNoReplicas := int32(0)
|
||||||
|
testDeploymentAvailableReplicas := int32(0)
|
||||||
testDeploymentLabels := map[string]string{"test-deployment-static": "true"}
|
testDeploymentLabels := map[string]string{"test-deployment-static": "true"}
|
||||||
testDeploymentLabelsFlat := "test-deployment-static=true"
|
testDeploymentLabelsFlat := "test-deployment-static=true"
|
||||||
w := &cache.ListWatch{
|
w := &cache.ListWatch{
|
||||||
@ -400,13 +401,13 @@ var _ = SIGDescribe("Deployment", func() {
|
|||||||
},
|
},
|
||||||
"status": map[string]interface{}{
|
"status": map[string]interface{}{
|
||||||
"readyReplicas": testDeploymentNoReplicas,
|
"readyReplicas": testDeploymentNoReplicas,
|
||||||
|
"availableReplicas": testDeploymentAvailableReplicas,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
framework.ExpectNoError(err, "failed to Marshal Deployment JSON patch")
|
framework.ExpectNoError(err, "failed to Marshal Deployment JSON patch")
|
||||||
// This test is broken, patching fails with:
|
|
||||||
// Deployment.apps "test-deployment" is invalid: status.availableReplicas: Invalid value: 2: cannot be greater than readyReplicas
|
_, err = dc.Resource(deploymentResource).Namespace(testNamespaceName).Patch(ctx, testDeploymentName, types.StrategicMergePatchType, []byte(deploymentStatusPatch), metav1.PatchOptions{}, "status")
|
||||||
// https://github.com/kubernetes/kubernetes/issues/113259
|
framework.ExpectNoError(err)
|
||||||
_, _ = dc.Resource(deploymentResource).Namespace(testNamespaceName).Patch(ctx, testDeploymentName, types.StrategicMergePatchType, []byte(deploymentStatusPatch), metav1.PatchOptions{}, "status")
|
|
||||||
|
|
||||||
ctxUntil, cancel = context.WithTimeout(ctx, 30*time.Second)
|
ctxUntil, cancel = context.WithTimeout(ctx, 30*time.Second)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
Loading…
Reference in New Issue
Block a user