Skip to content

Commit

Permalink
Merge pull request #11505 from terraform-providers/t-serialize-worksp…
Browse files Browse the repository at this point in the history
…aces-directory-tests

Serializes WorkSpaces Directory tests
  • Loading branch information
gdavison authored Jan 8, 2020
2 parents 68ef163 + af5f03f commit 212df20
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions aws/resource_aws_workspaces_directory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,21 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/terraform"
)

func TestAccAwsWorkspacesDirectory_basic(t *testing.T) {
// These tests need to be serialized, because they all rely on the IAM Role `workspaces_DefaultRole`.
func TestAccAwsWorkspacesDirectory(t *testing.T) {
testCases := map[string]func(t *testing.T){
"basic": testAccAwsWorkspacesDirectory_basic,
"subnetIds": testAccAwsWorkspacesDirectory_subnetIds,
}
for name, tc := range testCases {
tc := tc
t.Run(name, func(t *testing.T) {
tc(t)
})
}
}

func testAccAwsWorkspacesDirectory_basic(t *testing.T) {
booster := acctest.RandString(8)
resourceName := "aws_workspaces_directory.main"

Expand Down Expand Up @@ -75,7 +89,7 @@ func TestAccAwsWorkspacesDirectory_basic(t *testing.T) {
})
}

func TestAccAwsWorkspacesDirectory_subnetIds(t *testing.T) {
func testAccAwsWorkspacesDirectory_subnetIds(t *testing.T) {
booster := acctest.RandString(8)
resourceName := "aws_workspaces_directory.main"

Expand Down

0 comments on commit 212df20

Please sign in to comment.