Better kubelet logging for probes

Log when we actually run probes and event when they fail.  Print the output of
a probe, too.
This commit is contained in:
Tim Hockin
2015-05-13 17:30:37 -07:00
parent d85dc7b2ea
commit 75617e8760
11 changed files with 162 additions and 114 deletions

View File

@@ -59,7 +59,7 @@ func TestHTTPKubeletClient(t *testing.T) {
Client: http.DefaultClient,
Port: uint(port),
}
gotObj, err := c.HealthCheck(parts[0])
gotObj, _, err := c.HealthCheck(parts[0])
if err != nil {
t.Errorf("unexpected error: %v", err)
}
@@ -93,7 +93,7 @@ func TestHTTPKubeletClientError(t *testing.T) {
Client: http.DefaultClient,
Port: uint(port),
}
gotObj, err := c.HealthCheck(parts[0])
gotObj, _, err := c.HealthCheck(parts[0])
if gotObj != expectObj {
t.Errorf("expected: %#v, got %#v", expectObj, gotObj)
}
@@ -114,7 +114,7 @@ func TestNewKubeletClient(t *testing.T) {
}
host := "127.0.0.1"
healthStatus, err := client.HealthCheck(host)
healthStatus, _, err := client.HealthCheck(host)
if healthStatus != probe.Failure {
t.Errorf("Expected %v and got %v.", probe.Failure, healthStatus)
}