Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix reboot test to use system namespace #11080

Merged
merged 1 commit into from
Jul 12, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/e2e/reboot.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
4 changes: 2 additions & 2 deletions test/e2e/restart.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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.")
}
Expand Down
8 changes: 1 addition & 7 deletions test/e2e/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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",
Expand Down