mirror of https://github.com/k3s-io/k3s
test: reduce deployment progress deadline, ensure its rs is up
parent
c84f3abca1
commit
5e61e5fc7d
|
@ -1217,16 +1217,16 @@ func testFailedDeployment(f *framework.Framework) {
|
|||
// Create a nginx deployment.
|
||||
deploymentName := "nginx"
|
||||
nonExistentImage := "nginx:not-there"
|
||||
thirty := int32(30)
|
||||
ten := int32(10)
|
||||
d := framework.NewDeployment(deploymentName, replicas, podLabels, nginxImageName, nonExistentImage, extensions.RecreateDeploymentStrategyType)
|
||||
d.Spec.ProgressDeadlineSeconds = &thirty
|
||||
d.Spec.ProgressDeadlineSeconds = &ten
|
||||
|
||||
framework.Logf("Creating deployment %q with progressDeadlineSeconds set to %ds and a non-existent image", deploymentName, thirty)
|
||||
framework.Logf("Creating deployment %q with progressDeadlineSeconds set to %ds and a non-existent image", deploymentName, ten)
|
||||
deployment, err := c.Extensions().Deployments(ns).Create(d)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
framework.Logf("Waiting for deployment %q to be observed by the controller", deploymentName)
|
||||
Expect(framework.WaitForObservedDeployment(c, ns, deploymentName, deployment.Generation)).NotTo(HaveOccurred())
|
||||
framework.Logf("Waiting for deployment %q new replica set to come up", deploymentName)
|
||||
Expect(framework.WaitForDeploymentUpdatedReplicasLTE(c, ns, deploymentName, 1, deployment.Generation))
|
||||
|
||||
framework.Logf("Checking deployment %q for a timeout condition", deploymentName)
|
||||
Expect(framework.WaitForDeploymentWithCondition(c, ns, deploymentName, deploymentutil.TimedOutReason, extensions.DeploymentProgressing)).NotTo(HaveOccurred())
|
||||
|
@ -1237,8 +1237,8 @@ func testFailedDeployment(f *framework.Framework) {
|
|||
})
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
framework.Logf("Waiting for deployment %q to be observed by the controller", deploymentName)
|
||||
Expect(framework.WaitForObservedDeployment(c, ns, deploymentName, deployment.Generation)).NotTo(HaveOccurred())
|
||||
framework.Logf("Waiting for deployment %q new replica set to come up", deploymentName)
|
||||
Expect(framework.WaitForDeploymentUpdatedReplicasLTE(c, ns, deploymentName, 1, deployment.Generation))
|
||||
|
||||
framework.Logf("Waiting for deployment %q status", deploymentName)
|
||||
Expect(framework.WaitForDeploymentStatusValid(c, deployment)).NotTo(HaveOccurred())
|
||||
|
|
Loading…
Reference in New Issue