mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +00:00
Update naming of watchEvents
This commit is contained in:
parent
957ab9afaf
commit
772eacadc1
@ -141,9 +141,9 @@ var _ = SIGDescribe("ReplicationController", func() {
|
|||||||
rcWatchChan := rcWatch.ResultChan()
|
rcWatchChan := rcWatch.ResultChan()
|
||||||
|
|
||||||
ginkgo.By("waiting for available Replicas")
|
ginkgo.By("waiting for available Replicas")
|
||||||
for event := range rcWatchChan {
|
for watchEvent := range rcWatchChan {
|
||||||
rc, ok := event.Object.(*v1.ReplicationController)
|
rc, ok := watchEvent.Object.(*v1.ReplicationController)
|
||||||
framework.ExpectEqual(ok, true, "Unable to convert type of ReplicationController watch event")
|
framework.ExpectEqual(ok, true, "Unable to convert type of ReplicationController watch watchEvent")
|
||||||
if rc.Status.Replicas == testRcInitialReplicaCount && rc.Status.ReadyReplicas == testRcInitialReplicaCount {
|
if rc.Status.Replicas == testRcInitialReplicaCount && rc.Status.ReadyReplicas == testRcInitialReplicaCount {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@ -198,9 +198,9 @@ var _ = SIGDescribe("ReplicationController", func() {
|
|||||||
var rcFromWatch *v1.ReplicationController
|
var rcFromWatch *v1.ReplicationController
|
||||||
ginkgo.By("waiting for ReplicationController's scale to be the max amount")
|
ginkgo.By("waiting for ReplicationController's scale to be the max amount")
|
||||||
foundRcWithMaxScale := false
|
foundRcWithMaxScale := false
|
||||||
for event := range rcWatchChan {
|
for watchEvent := range rcWatchChan {
|
||||||
rc, ok := event.Object.(*v1.ReplicationController)
|
rc, ok := watchEvent.Object.(*v1.ReplicationController)
|
||||||
framework.ExpectEqual(ok, true, "Unable to convert type of ReplicationController watch event")
|
framework.ExpectEqual(ok, true, "Unable to convert type of ReplicationController watch watchEvent")
|
||||||
if rc.ObjectMeta.Name == testRcName && rc.ObjectMeta.Namespace == testRcNamespace && rc.Status.Replicas == testRcMaxReplicaCount && rc.Status.ReadyReplicas == testRcMaxReplicaCount {
|
if rc.ObjectMeta.Name == testRcName && rc.ObjectMeta.Namespace == testRcNamespace && rc.Status.Replicas == testRcMaxReplicaCount && rc.Status.ReadyReplicas == testRcMaxReplicaCount {
|
||||||
foundRcWithMaxScale = true
|
foundRcWithMaxScale = true
|
||||||
rcFromWatch = rc
|
rcFromWatch = rc
|
||||||
@ -227,9 +227,9 @@ var _ = SIGDescribe("ReplicationController", func() {
|
|||||||
framework.ExpectEqual(rcStatus.Status.ReadyReplicas, int32(1), "ReplicationControllerStatus readyReplicas does not equal 1")
|
framework.ExpectEqual(rcStatus.Status.ReadyReplicas, int32(1), "ReplicationControllerStatus readyReplicas does not equal 1")
|
||||||
|
|
||||||
ginkgo.By(fmt.Sprintf("waiting for ReplicationController readyReplicas to be equal to %v", testRcMaxReplicaCount))
|
ginkgo.By(fmt.Sprintf("waiting for ReplicationController readyReplicas to be equal to %v", testRcMaxReplicaCount))
|
||||||
for event := range rcWatchChan {
|
for watchEvent := range rcWatchChan {
|
||||||
rc, ok := event.Object.(*v1.ReplicationController)
|
rc, ok := watchEvent.Object.(*v1.ReplicationController)
|
||||||
framework.ExpectEqual(ok, true, "unable to convert type of ReplicationController watch event")
|
framework.ExpectEqual(ok, true, "unable to convert type of ReplicationController watch watchEvent")
|
||||||
if rc.Status.Replicas == testRcMaxReplicaCount && rc.Status.ReadyReplicas == testRcMaxReplicaCount {
|
if rc.Status.Replicas == testRcMaxReplicaCount && rc.Status.ReadyReplicas == testRcMaxReplicaCount {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@ -259,9 +259,9 @@ var _ = SIGDescribe("ReplicationController", func() {
|
|||||||
err = f.ClientSet.CoreV1().ReplicationControllers(testRcNamespace).DeleteCollection(context.TODO(), &metav1.DeleteOptions{}, metav1.ListOptions{LabelSelector: "test-rc-static=true"})
|
err = f.ClientSet.CoreV1().ReplicationControllers(testRcNamespace).DeleteCollection(context.TODO(), &metav1.DeleteOptions{}, metav1.ListOptions{LabelSelector: "test-rc-static=true"})
|
||||||
framework.ExpectNoError(err, "Failed to delete ReplicationControllers")
|
framework.ExpectNoError(err, "Failed to delete ReplicationControllers")
|
||||||
|
|
||||||
ginkgo.By("waiting for ReplicationController to have a DELETED event")
|
ginkgo.By("waiting for ReplicationController to have a DELETED watchEvent")
|
||||||
for event := range rcWatchChan {
|
for watchEvent := range rcWatchChan {
|
||||||
if event.Type == "DELETED" {
|
if watchEvent.Type == "DELETED" {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user