From 910603bba91335a3cba8b109063e45dd3d96c518 Mon Sep 17 00:00:00 2001 From: Satnam Singh Date: Fri, 10 Jul 2015 14:01:45 -0700 Subject: [PATCH] Fix reboot test to use system namespace --- test/e2e/reboot.go | 2 +- test/e2e/restart.go | 4 ++-- test/e2e/util.go | 8 +------- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/test/e2e/reboot.go b/test/e2e/reboot.go index ecfad1943f2..08a37091dbe 100644 --- a/test/e2e/reboot.go +++ b/test/e2e/reboot.go @@ -156,7 +156,7 @@ func issueSSHCommand(node *api.Node, provider, cmd string) error { // failed step, it will return false through result and not run the rest. func rebootNode(c *client.Client, provider, name, rebootCmd string, result chan bool) { // Setup - ns := api.NamespaceDefault + ns := api.NamespaceSystem ps := newPodStore(c, ns, labels.Everything(), fields.OneTermEqualSelector(client.PodHost, name)) defer ps.Stop() diff --git a/test/e2e/restart.go b/test/e2e/restart.go index 2ef73849b0e..79a35cd496d 100644 --- a/test/e2e/restart.go +++ b/test/e2e/restart.go @@ -64,7 +64,7 @@ var _ = Describe("Restart", func() { SkipUnlessProviderIs("gce", "gke") skipped = false - ps = newPodStore(c, api.NamespaceDefault, labels.Everything(), fields.Everything()) + ps = newPodStore(c, api.NamespaceSystem, labels.Everything(), fields.Everything()) }) AfterEach(func() { @@ -89,7 +89,7 @@ var _ = Describe("Restart", func() { for i, p := range pods { podNamesBefore[i] = p.ObjectMeta.Name } - ns := api.NamespaceDefault + ns := api.NamespaceSystem if !checkPodsRunningReady(c, ns, podNamesBefore, podReadyBeforeTimeout) { Failf("At least one pod wasn't running and ready at test start.") } diff --git a/test/e2e/util.go b/test/e2e/util.go index 430270ea7ab..c183e26b607 100644 --- a/test/e2e/util.go +++ b/test/e2e/util.go @@ -551,12 +551,6 @@ func waitForPodSuccessInNamespace(c *client.Client, podName string, contName str }) } -// waitForPodSuccess returns nil if the pod reached state success, or an error if it reached failure or ran too long. -// The default namespace is used to identify pods. -func waitForPodSuccess(c *client.Client, podName string, contName string) error { - return waitForPodSuccessInNamespace(c, podName, contName, api.NamespaceDefault) -} - // waitForRCPodOnNode returns the pod from the given replication controller (decribed by rcName) which is scheduled on the given node. // In case of failure or too long waiting time, an error is returned. func waitForRCPodOnNode(c *client.Client, ns, rcName, node string) (*api.Pod, error) { @@ -1224,7 +1218,7 @@ func dumpNodeDebugInfo(c *client.Client, nodeNames []string) { // restart and node unhealthy events. Note that listing events like this will mess // with latency metrics, beware of calling it during a test. func getNodeEvents(c *client.Client, nodeName string) []api.Event { - events, err := c.Events(api.NamespaceDefault).List( + events, err := c.Events(api.NamespaceSystem).List( labels.Everything(), fields.Set{ "involvedObject.kind": "Node",