Commit e1ea646a authored by Chao Xu's avatar Chao Xu

set rv to make List() result up-to-date

parent a898e7a3
...@@ -89,12 +89,17 @@ var _ = Describe("Generated release_1_2 clientset", func() { ...@@ -89,12 +89,17 @@ var _ = Describe("Generated release_1_2 clientset", func() {
// the test so we can ensure that we clean up after // the test so we can ensure that we clean up after
// ourselves // ourselves
defer podClient.Delete(pod.Name, api.NewDeleteOptions(0)) defer podClient.Delete(pod.Name, api.NewDeleteOptions(0))
_, err = podClient.Create(pod) pod, err = podClient.Create(pod)
if err != nil { if err != nil {
Failf("Failed to create pod: %v", err) Failf("Failed to create pod: %v", err)
} }
By("verifying the pod is in kubernetes") By("verifying the pod is in kubernetes")
selector = labels.SelectorFromSet(labels.Set(map[string]string{"time": value}))
options = api.ListOptions{
LabelSelector: selector,
ResourceVersion: pod.ResourceVersion,
}
pods, err = podClient.List(options) pods, err = podClient.List(options)
if err != nil { if err != nil {
Failf("Failed to query for pods: %v", err) Failf("Failed to query for pods: %v", err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment