mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 05:36:12 +00:00
@@ -150,7 +150,7 @@ func RunRC(c *client.Client, name string, ns, image string, replicas int) {
|
||||
if p.Status.Phase == api.PodRunning {
|
||||
current++
|
||||
} else if p.Status.Phase == api.PodPending {
|
||||
if p.Status.Host == "" {
|
||||
if p.Spec.Host == "" {
|
||||
waiting++
|
||||
} else {
|
||||
pending++
|
||||
|
@@ -337,7 +337,7 @@ func testContainerOutputInNamespace(ns, scenarioName string, c *client.Client, p
|
||||
}
|
||||
|
||||
By(fmt.Sprintf("Trying to get logs from host %s pod %s container %s: %v",
|
||||
podStatus.Status.Host, podStatus.Name, containerName, err))
|
||||
podStatus.Spec.Host, podStatus.Name, containerName, err))
|
||||
var logs []byte
|
||||
start := time.Now()
|
||||
|
||||
@@ -346,7 +346,7 @@ func testContainerOutputInNamespace(ns, scenarioName string, c *client.Client, p
|
||||
logs, err = c.Get().
|
||||
Prefix("proxy").
|
||||
Resource("minions").
|
||||
Name(podStatus.Status.Host).
|
||||
Name(podStatus.Spec.Host).
|
||||
Suffix("containerLogs", ns, podStatus.Name, containerName).
|
||||
Do().
|
||||
Raw()
|
||||
@@ -354,7 +354,7 @@ func testContainerOutputInNamespace(ns, scenarioName string, c *client.Client, p
|
||||
By(fmt.Sprintf("pod logs:%v\n", string(logs)))
|
||||
if strings.Contains(string(logs), "Internal Error") {
|
||||
By(fmt.Sprintf("Failed to get logs from host %q pod %q container %q: %v",
|
||||
podStatus.Status.Host, podStatus.Name, containerName, string(logs)))
|
||||
podStatus.Spec.Host, podStatus.Name, containerName, string(logs)))
|
||||
time.Sleep(5 * time.Second)
|
||||
continue
|
||||
}
|
||||
|
@@ -127,7 +127,7 @@ func TestClient(t *testing.T) {
|
||||
if actual.Name != got.Name {
|
||||
t.Errorf("expected pod %#v, got %#v", got, actual)
|
||||
}
|
||||
if actual.Status.Host != "" {
|
||||
if actual.Spec.Host != "" {
|
||||
t.Errorf("expected pod to be unscheduled, got %#v", actual)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user