Unify the namespace pattern for density.go with the others

This commit is contained in:
jayunit100 2015-04-26 16:21:29 -04:00
parent e061043cf1
commit 804ce233ba

View File

@ -54,7 +54,9 @@ var _ = Describe("Density", func() {
expectNoError(err) expectNoError(err)
minionCount = len(minions.Items) minionCount = len(minions.Items)
Expect(minionCount).NotTo(BeZero()) Expect(minionCount).NotTo(BeZero())
ns = api.NamespaceDefault nsForTesting, err := createTestingNS("density", c)
ns = nsForTesting.Name
expectNoError(err)
}) })
AfterEach(func() { AfterEach(func() {
@ -69,11 +71,9 @@ var _ = Describe("Density", func() {
expectNoError(err) expectNoError(err)
} }
// Clean up the namespace if a non-default one was used By(fmt.Sprintf("Destroying namespace for this suite %v", ns))
if ns != api.NamespaceDefault { if err := c.Namespaces().Delete(ns); err != nil {
By("Cleaning up the namespace") Failf("Couldn't delete ns %s", err)
err := c.Namespaces().Delete(ns)
expectNoError(err)
} }
}) })
@ -104,10 +104,8 @@ var _ = Describe("Density", func() {
} }
itArg := testArg itArg := testArg
It(name, func() { It(name, func() {
uuid := string(util.NewUUID())
totalPods := itArg.podsPerMinion * minionCount totalPods := itArg.podsPerMinion * minionCount
nameStr := strconv.Itoa(totalPods) + "-" + uuid nameStr := strconv.Itoa(totalPods) + "-" + string(util.NewUUID())
ns = "e2e-density" + nameStr
RCName = "my-hostname-density" + nameStr RCName = "my-hostname-density" + nameStr
// Create a listener for events // Create a listener for events