Skip to content

Commit

Permalink
Merge pull request #7142 from a-robinson/ns
Browse files Browse the repository at this point in the history
Update the external load balancer test to use a different namespace in each run
  • Loading branch information
a-robinson committed Apr 22, 2015
2 parents a666c1e + a9902fe commit 0c8ee98
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions test/e2e/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ var _ = Describe("Services", func() {

It("should be able to create a functioning external load balancer", func() {
serviceName := "external-lb-test"
ns := api.NamespaceDefault
ns := namespace0
labels := map[string]string{
"key0": "value0",
}
Expand All @@ -275,9 +275,6 @@ var _ = Describe("Services", func() {
},
}

By("cleaning up previous service " + serviceName + " from namespace " + ns)
c.Services(ns).Delete(serviceName)

By("creating service " + serviceName + " with external load balancer in namespace " + ns)
result, err := c.Services(ns).Create(service)
Expect(err).NotTo(HaveOccurred())
Expand Down Expand Up @@ -317,7 +314,7 @@ var _ = Describe("Services", func() {
}

By("creating pod to be part of service " + serviceName)
podClient := c.Pods(api.NamespaceDefault)
podClient := c.Pods(ns)
defer func() {
By("deleting pod " + pod.Name)
defer GinkgoRecover()
Expand All @@ -326,7 +323,7 @@ var _ = Describe("Services", func() {
if _, err := podClient.Create(pod); err != nil {
Failf("Failed to create pod %s: %v", pod.Name, err)
}
expectNoError(waitForPodRunning(c, pod.Name))
expectNoError(waitForPodRunningInNamespace(c, pod.Name, ns))

By("hitting the pod through the service's external load balancer")
var resp *http.Response
Expand Down

0 comments on commit 0c8ee98

Please sign in to comment.