mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 08:17:26 +00:00
Add a test for important URLs.
This commit is contained in:
parent
6b009f06cd
commit
203e76020e
@ -169,6 +169,28 @@ func TestPodUpdate(c *client.Client) bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestImportantURLs validates that URLs that people depend on haven't moved.
|
||||||
|
// ***IMPORTANT*** Do *not* fix this test just by changing the path. If you moved a URL
|
||||||
|
// you can break upstream dependencies.
|
||||||
|
func TestImportantURLs(c *client.Client) bool {
|
||||||
|
tests := []struct {
|
||||||
|
path string
|
||||||
|
}{}
|
||||||
|
ok := true
|
||||||
|
for _, test := range tests {
|
||||||
|
glog.Infof("testing: %s", test.path)
|
||||||
|
data, err := c.RESTClient.Get().
|
||||||
|
AbsPath(test.path).
|
||||||
|
Do().
|
||||||
|
Raw()
|
||||||
|
}
|
||||||
|
if err != nil {
|
||||||
|
glog.Errorf("Failed: %v\nBody: %s", err, string(data))
|
||||||
|
ok := false
|
||||||
|
}
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
// TestKubeletSendsEvent checks that kubelets and scheduler send events about pods scheduling and running.
|
// TestKubeletSendsEvent checks that kubelets and scheduler send events about pods scheduling and running.
|
||||||
func TestKubeletSendsEvent(c *client.Client) bool {
|
func TestKubeletSendsEvent(c *client.Client) bool {
|
||||||
provider := os.Getenv("KUBERNETES_PROVIDER")
|
provider := os.Getenv("KUBERNETES_PROVIDER")
|
||||||
|
Loading…
Reference in New Issue
Block a user