From e792d526b3199d1bb17c3bfe0ff7bff454243ad9 Mon Sep 17 00:00:00 2001 From: Lisa Cho Date: Wed, 30 Oct 2019 13:48:54 -0700 Subject: [PATCH] Randomize the shared domain created by this spec - Future proofs this spec for parallel running -[#169354687](https://www.pivotaltracker.com/story/show/169354687) Authored-by: Lisa Cho --- volume_services/volume_services.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/volume_services/volume_services.go b/volume_services/volume_services.go index 568b13435..cd13f13cb 100644 --- a/volume_services/volume_services.go +++ b/volume_services/volume_services.go @@ -4,6 +4,7 @@ import ( "encoding/json" "fmt" "path/filepath" + "strings" "time" "github.com/cloudfoundry-incubator/cf-test-helpers/cf" @@ -45,7 +46,9 @@ var _ = VolumeServicesDescribe("Volume Services", func() { session = cf.Cf("curl", fmt.Sprintf("/routing/v1/router_groups/%s", routerGroupGuid), "-X", "PUT", "-d", payload).Wait() Expect(session).To(Exit(0), "cannot update tcp router group to allow nfs traffic") - tcpDomain = fmt.Sprintf("tcp.%s", Config.GetAppsDomain()) + randomDomain := strings.ReplaceAll(random_name.CATSRandomName("SHARED_DOMAIN"), "_", "-") + + tcpDomain = fmt.Sprintf("%s.%s", randomDomain, Config.GetAppsDomain()) session = cf.Cf("create-shared-domain", tcpDomain, "--router-group", "default-tcp").Wait() Expect(session).To(Exit(0), "can not create shared tcp domain")