Add a test for important URLs on the apiserver.

This commit is contained in:
Brendan Burns 2014-11-25 15:41:52 -08:00
parent 203e76020e
commit d43343db5e

View File

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