From 4b43a6a97997f63353a378e1924dd54c3ca8d030 Mon Sep 17 00:00:00 2001 From: jayunit100 Date: Tue, 21 Apr 2015 09:27:39 -0400 Subject: [PATCH] Implement pure UUID suffix Functionality into namespace, without implementing randomSuffix() (yet). --- test/e2e/util.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/e2e/util.go b/test/e2e/util.go index 09088899245..83b9d60962d 100644 --- a/test/e2e/util.go +++ b/test/e2e/util.go @@ -33,6 +33,8 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" + + "code.google.com/p/go-uuid/uuid" ) const ( @@ -85,7 +87,7 @@ func waitForPodCondition(c *client.Client, ns, podName, desc string, condition p func createTestingNS(baseName string, c *client.Client) (*api.Namespace, error) { namespaceObj := &api.Namespace{ ObjectMeta: api.ObjectMeta{ - Name: fmt.Sprintf("e2e-tests-%v-%v", baseName, randomSuffix()), + Name: fmt.Sprintf("e2e-tests-%v-%v", baseName, uuid.New()), Namespace: "", }, Status: api.NamespaceStatus{}, @@ -193,7 +195,6 @@ func loadClient() (*client.Client, error) { } // randomSuffix provides a random string to append to pods,services,rcs. -// NOTE: For test's namespaces, instead use createGinkgoNS(..). // TODO: Allow service names to have the same form as names // for pods and replication controllers so we don't // need to use such a function and can instead