Skip to content

Commit

Permalink
Use ParallelTest instead of manually setting t.Parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
k-yomo committed May 13, 2021
1 parent f60011d commit 6194136
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
4 changes: 1 addition & 3 deletions internal/provider/resource_api_key_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ import (
)

func TestAccResourceAPIKey(t *testing.T) {
t.Parallel()

name := randStringStartWithAlpha(100)
resourceName := fmt.Sprintf("algolia_api_key.%s", name)

resource.UnitTest(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ProviderFactories: providerFactories,
Steps: []resource.TestStep{
Expand Down
4 changes: 1 addition & 3 deletions internal/provider/resource_index_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ import (

// TODO: Cover all params
func TestAccResourceIndex(t *testing.T) {
t.Parallel()

indexName := randStringStartWithAlpha(100)
resourceName := fmt.Sprintf("algolia_index.%s", indexName)

resource.UnitTest(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ProviderFactories: providerFactories,
Steps: []resource.TestStep{
Expand Down
4 changes: 1 addition & 3 deletions internal/provider/resource_rule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ import (
)

func TestAccResourceRule(t *testing.T) {
t.Parallel()

indexName := randStringStartWithAlpha(100)
objectID := randStringStartWithAlpha(64)
resourceName := fmt.Sprintf("algolia_rule.%s", objectID)

resource.UnitTest(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ProviderFactories: providerFactories,
Steps: []resource.TestStep{
Expand Down
4 changes: 1 addition & 3 deletions internal/provider/resource_synonyms_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ import (
)

func TestAccResourceSynonyms(t *testing.T) {
t.Parallel()

indexName := randStringStartWithAlpha(100)
resourceName := fmt.Sprintf("algolia_synonyms.%s", indexName)

resource.UnitTest(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ProviderFactories: providerFactories,
Steps: []resource.TestStep{
Expand Down

0 comments on commit 6194136

Please sign in to comment.