Skip to content

Commit

Permalink
Randomize some test workspace names to avoid collisions
Browse files Browse the repository at this point in the history
  • Loading branch information
nfagerlund committed Nov 6, 2023
1 parent c48d728 commit d9f7d45
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions workspace_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}

Expand All @@ -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"),
Expand Down Expand Up @@ -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())
Expand Down

0 comments on commit d9f7d45

Please sign in to comment.