mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-04 02:37:36 +00:00
Make e2e scale updates unconditional
This commit is contained in:
@@ -787,6 +787,7 @@ var _ = SIGDescribe("StatefulSet", func() {
|
||||
framework.ExpectEqual(scale.Status.Replicas, int32(1))
|
||||
|
||||
ginkgo.By("updating a scale subresource")
|
||||
scale.ResourceVersion = "" // indicate the scale update should be unconditional
|
||||
scale.Spec.Replicas = 2
|
||||
scaleResult, err := c.AppsV1().StatefulSets(ns).UpdateScale(ssName, scale)
|
||||
if err != nil {
|
||||
|
@@ -680,6 +680,7 @@ func (j *TestJig) Scale(replicas int) error {
|
||||
return fmt.Errorf("failed to get scale for RC %q: %v", rc, err)
|
||||
}
|
||||
|
||||
scale.ResourceVersion = "" // indicate the scale update should be unconditional
|
||||
scale.Spec.Replicas = int32(replicas)
|
||||
_, err = j.Client.CoreV1().ReplicationControllers(j.Namespace).UpdateScale(rc, scale)
|
||||
if err != nil {
|
||||
|
@@ -350,6 +350,7 @@ var _ = SIGDescribe("Loadbalancing: L7", func() {
|
||||
scale, err := f.ClientSet.AppsV1().Deployments(ns).GetScale(name, metav1.GetOptions{})
|
||||
framework.ExpectNoError(err)
|
||||
if scale.Spec.Replicas != int32(num) {
|
||||
scale.ResourceVersion = "" // indicate the scale update should be unconditional
|
||||
scale.Spec.Replicas = int32(num)
|
||||
_, err = f.ClientSet.AppsV1().Deployments(ns).UpdateScale(name, scale)
|
||||
framework.ExpectNoError(err)
|
||||
@@ -400,6 +401,7 @@ var _ = SIGDescribe("Loadbalancing: L7", func() {
|
||||
ginkgo.By(fmt.Sprintf("Scale backend replicas to %d", replicas))
|
||||
scale, err := f.ClientSet.AppsV1().Deployments(ns).GetScale(name, metav1.GetOptions{})
|
||||
framework.ExpectNoError(err)
|
||||
scale.ResourceVersion = "" // indicate the scale update should be unconditional
|
||||
scale.Spec.Replicas = int32(replicas)
|
||||
_, err = f.ClientSet.AppsV1().Deployments(ns).UpdateScale(name, scale)
|
||||
framework.ExpectNoError(err)
|
||||
@@ -448,6 +450,7 @@ var _ = SIGDescribe("Loadbalancing: L7", func() {
|
||||
scale, err := f.ClientSet.AppsV1().Deployments(ns).GetScale(name, metav1.GetOptions{})
|
||||
framework.ExpectNoError(err)
|
||||
if scale.Spec.Replicas != int32(num) {
|
||||
scale.ResourceVersion = "" // indicate the scale update should be unconditional
|
||||
scale.Spec.Replicas = int32(num)
|
||||
_, err = f.ClientSet.AppsV1().Deployments(ns).UpdateScale(name, scale)
|
||||
framework.ExpectNoError(err)
|
||||
|
Reference in New Issue
Block a user