Commit ba26b227 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #30168 from mtaufen/test-e2e-framework-pods-name-fix

Automatic merge from submit-queue Bug fix: Use p.Name instead of pod.Name For example, if you used `pod.GenerateName`, `pod.Name` might be the empty string while `p.Name` contains the actual name of your pod. Thus passing `pod.Name` can result in a `resource name may not be empty` error.
parents e50a491e 73f2c55e
...@@ -56,7 +56,7 @@ func (c *PodClient) CreateSync(pod *api.Pod) *api.Pod { ...@@ -56,7 +56,7 @@ func (c *PodClient) CreateSync(pod *api.Pod) *api.Pod {
p := c.Create(pod) p := c.Create(pod)
ExpectNoError(c.f.WaitForPodRunning(p.Name)) ExpectNoError(c.f.WaitForPodRunning(p.Name))
// Get the newest pod after it becomes running, some status may change after pod created, such as pod ip. // Get the newest pod after it becomes running, some status may change after pod created, such as pod ip.
p, err := c.Get(pod.Name) p, err := c.Get(p.Name)
ExpectNoError(err) ExpectNoError(err)
return p return p
} }
......
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