Add a test for important URLs on the apiserver.

pull/6/head
Brendan Burns 2014-11-25 15:41:52 -08:00
parent 203e76020e
commit d43343db5e
1 changed files with 10 additions and 5 deletions

View File

@ -175,7 +175,11 @@ func TestPodUpdate(c *client.Client) bool {
func TestImportantURLs(c *client.Client) bool {
tests := []struct {
path string
}{}
}{
{path: "/validate"},
{path: "/healthz"},
// TODO: test proxy links here
}
ok := true
for _, test := range tests {
glog.Infof("testing: %s", test.path)
@ -183,10 +187,10 @@ func TestImportantURLs(c *client.Client) bool {
AbsPath(test.path).
Do().
Raw()
}
if err != nil {
glog.Errorf("Failed: %v\nBody: %s", err, string(data))
ok := false
if err != nil {
glog.Errorf("Failed: %v\nBody: %s", err, string(data))
ok = false
}
}
return ok
}
@ -288,6 +292,7 @@ func main() {
tests := []func(c *client.Client) bool{
TestKubernetesROService,
TestKubeletSendsEvent,
TestImportantURLs,
// TODO(brendandburns): fix this test and re-add it: TestPodUpdate,
}