From d9f7d4539cea61d8db05ee1099a6116fbee488d5 Mon Sep 17 00:00:00 2001 From: Nick Fagerlund Date: Mon, 6 Nov 2023 11:10:05 -0800 Subject: [PATCH] Randomize some test workspace names to avoid collisions --- workspace_integration_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/workspace_integration_test.go b/workspace_integration_test.go index 204018640..d100e1a98 100644 --- a/workspace_integration_test.go +++ b/workspace_integration_test.go @@ -513,7 +513,7 @@ func TestWorkspacesCreate(t *testing.T) { // to the basic "with valid options" test below. options := WorkspaceCreateOptions{ - Name: String("foo"), + Name: String(fmt.Sprintf("foo-%s", randomString(t))), AutoApplyRunTrigger: Bool(true), } @@ -536,7 +536,7 @@ func TestWorkspacesCreate(t *testing.T) { t.Run("with valid options", func(t *testing.T) { options := WorkspaceCreateOptions{ - Name: String("foo"), + Name: String(fmt.Sprintf("foo-%s", randomString(t))), AllowDestroyPlan: Bool(false), AutoApply: Bool(true), Description: String("qux"), @@ -609,7 +609,7 @@ func TestWorkspacesCreate(t *testing.T) { t.Run("when options has an invalid organization", func(t *testing.T) { w, err := client.Workspaces.Create(ctx, badIdentifier, WorkspaceCreateOptions{ - Name: String("foo"), + Name: String(fmt.Sprintf("foo-%s", randomString(t))), }) assert.Nil(t, w) assert.EqualError(t, err, ErrInvalidOrg.Error())