Skip to content

Commit 04a8514

Browse files
committed
Datasource tests don't need to be serialized
1 parent 8e48cbc commit 04a8514

File tree

2 files changed

+28
-44
lines changed

2 files changed

+28
-44
lines changed

internal/service/appsync/appsync_test.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,6 @@ func TestAccAppSync_serial(t *testing.T) {
1818
"description": testAccAPIKey_description,
1919
"expires": testAccAPIKey_expires,
2020
},
21-
"DataSource": {
22-
acctest.CtBasic: testAccDataSource_basic,
23-
"description": testAccDataSource_description,
24-
"DynamoDB_region": testAccDataSource_DynamoDB_region,
25-
"DynamoDB_useCallerCredentials": testAccDataSource_DynamoDB_useCallerCredentials,
26-
"HTTP_endpoint": testAccDataSource_HTTP_endpoint,
27-
"type": testAccDataSource_type,
28-
"Type_dynamoDB": testAccDataSource_Type_dynamoDB,
29-
"Type_http": testAccDataSource_Type_http,
30-
"Type_http_auth": testAccDataSource_Type_httpAuth,
31-
"Type_lambda": testAccDataSource_Type_lambda,
32-
"Type_none": testAccDataSource_Type_none,
33-
"Type_rdbms": testAccDataSource_Type_relationalDatabase,
34-
"Type_rdbms_options": testAccDataSource_Type_relationalDatabaseWithOptions,
35-
"Type_eventBridge": testAccDataSource_Type_eventBridge,
36-
},
3721
"Function": {
3822
acctest.CtBasic: testAccFunction_basic,
3923
"code": testAccFunction_code,

internal/service/appsync/datasource_test.go

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ import (
2020
"github.com/hashicorp/terraform-provider-aws/names"
2121
)
2222

23-
func testAccDataSource_basic(t *testing.T) {
23+
func TestAccAppSyncDataSource_basic(t *testing.T) {
2424
ctx := acctest.Context(t)
2525
rName := fmt.Sprintf("tfacctest%d", sdkacctest.RandInt())
2626
resourceName := "aws_appsync_datasource.test"
2727

28-
resource.Test(t, resource.TestCase{
28+
acctest.ParallelTest(ctx, t, resource.TestCase{
2929
PreCheck: func() { acctest.PreCheck(ctx, t); acctest.PreCheckPartitionHasService(t, names.AppSyncEndpointID) },
3030
ErrorCheck: acctest.ErrorCheck(t, names.AppSyncServiceID),
3131
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
@@ -57,12 +57,12 @@ func testAccDataSource_basic(t *testing.T) {
5757
})
5858
}
5959

60-
func testAccDataSource_description(t *testing.T) {
60+
func TestAccAppSyncDataSource_description(t *testing.T) {
6161
ctx := acctest.Context(t)
6262
rName := fmt.Sprintf("tfacctest%d", sdkacctest.RandInt())
6363
resourceName := "aws_appsync_datasource.test"
6464

65-
resource.Test(t, resource.TestCase{
65+
acctest.ParallelTest(ctx, t, resource.TestCase{
6666
PreCheck: func() { acctest.PreCheck(ctx, t); acctest.PreCheckPartitionHasService(t, names.AppSyncEndpointID) },
6767
ErrorCheck: acctest.ErrorCheck(t, names.AppSyncServiceID),
6868
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
@@ -91,12 +91,12 @@ func testAccDataSource_description(t *testing.T) {
9191
})
9292
}
9393

94-
func testAccDataSource_DynamoDB_region(t *testing.T) {
94+
func TestAccAppSyncDataSource_DynamoDB_region(t *testing.T) {
9595
ctx := acctest.Context(t)
9696
rName := fmt.Sprintf("tfacctest%d", sdkacctest.RandInt())
9797
resourceName := "aws_appsync_datasource.test"
9898

99-
resource.Test(t, resource.TestCase{
99+
acctest.ParallelTest(ctx, t, resource.TestCase{
100100
PreCheck: func() { acctest.PreCheck(ctx, t); acctest.PreCheckPartitionHasService(t, names.AppSyncEndpointID) },
101101
ErrorCheck: acctest.ErrorCheck(t, names.AppSyncServiceID),
102102
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
@@ -127,12 +127,12 @@ func testAccDataSource_DynamoDB_region(t *testing.T) {
127127
})
128128
}
129129

130-
func testAccDataSource_DynamoDB_useCallerCredentials(t *testing.T) {
130+
func TestAccAppSyncDataSource_DynamoDB_useCallerCredentials(t *testing.T) {
131131
ctx := acctest.Context(t)
132132
rName := fmt.Sprintf("tfacctest%d", sdkacctest.RandInt())
133133
resourceName := "aws_appsync_datasource.test"
134134

135-
resource.Test(t, resource.TestCase{
135+
acctest.ParallelTest(ctx, t, resource.TestCase{
136136
PreCheck: func() { acctest.PreCheck(ctx, t); acctest.PreCheckPartitionHasService(t, names.AppSyncEndpointID) },
137137
ErrorCheck: acctest.ErrorCheck(t, names.AppSyncServiceID),
138138
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
@@ -237,12 +237,12 @@ func TestAccAppSyncDataSource_OpenSearchService_region(t *testing.T) {
237237
})
238238
}
239239

240-
func testAccDataSource_HTTP_endpoint(t *testing.T) {
240+
func TestAccAppSyncDataSource_HTTP_endpoint(t *testing.T) {
241241
ctx := acctest.Context(t)
242242
rName := fmt.Sprintf("tfacctest%d", sdkacctest.RandInt())
243243
resourceName := "aws_appsync_datasource.test"
244244

245-
resource.Test(t, resource.TestCase{
245+
acctest.ParallelTest(ctx, t, resource.TestCase{
246246
PreCheck: func() { acctest.PreCheck(ctx, t); acctest.PreCheckPartitionHasService(t, names.AppSyncEndpointID) },
247247
ErrorCheck: acctest.ErrorCheck(t, names.AppSyncServiceID),
248248
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
@@ -275,12 +275,12 @@ func testAccDataSource_HTTP_endpoint(t *testing.T) {
275275
})
276276
}
277277

278-
func testAccDataSource_type(t *testing.T) {
278+
func TestAccAppSyncDataSource_type(t *testing.T) {
279279
ctx := acctest.Context(t)
280280
rName := fmt.Sprintf("tfacctest%d", sdkacctest.RandInt())
281281
resourceName := "aws_appsync_datasource.test"
282282

283-
resource.Test(t, resource.TestCase{
283+
acctest.ParallelTest(ctx, t, resource.TestCase{
284284
PreCheck: func() { acctest.PreCheck(ctx, t); acctest.PreCheckPartitionHasService(t, names.AppSyncEndpointID) },
285285
ErrorCheck: acctest.ErrorCheck(t, names.AppSyncServiceID),
286286
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
@@ -304,14 +304,14 @@ func testAccDataSource_type(t *testing.T) {
304304
})
305305
}
306306

307-
func testAccDataSource_Type_dynamoDB(t *testing.T) {
307+
func TestAccAppSyncDataSource_Type_dynamoDB(t *testing.T) {
308308
ctx := acctest.Context(t)
309309
rName := fmt.Sprintf("tfacctest%d", sdkacctest.RandInt())
310310
dynamodbTableResourceName := "aws_dynamodb_table.test"
311311
iamRoleResourceName := "aws_iam_role.test"
312312
resourceName := "aws_appsync_datasource.test"
313313

314-
resource.Test(t, resource.TestCase{
314+
acctest.ParallelTest(ctx, t, resource.TestCase{
315315
PreCheck: func() { acctest.PreCheck(ctx, t); acctest.PreCheckPartitionHasService(t, names.AppSyncEndpointID) },
316316
ErrorCheck: acctest.ErrorCheck(t, names.AppSyncServiceID),
317317
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
@@ -403,12 +403,12 @@ func TestAccAppSyncDataSource_Type_openSearchService(t *testing.T) {
403403
})
404404
}
405405

406-
func testAccDataSource_Type_http(t *testing.T) {
406+
func TestAccAppSyncDataSource_Type_http(t *testing.T) {
407407
ctx := acctest.Context(t)
408408
rName := fmt.Sprintf("tfacctest%d", sdkacctest.RandInt())
409409
resourceName := "aws_appsync_datasource.test"
410410

411-
resource.Test(t, resource.TestCase{
411+
acctest.ParallelTest(ctx, t, resource.TestCase{
412412
PreCheck: func() { acctest.PreCheck(ctx, t); acctest.PreCheckPartitionHasService(t, names.AppSyncEndpointID) },
413413
ErrorCheck: acctest.ErrorCheck(t, names.AppSyncServiceID),
414414
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
@@ -432,12 +432,12 @@ func testAccDataSource_Type_http(t *testing.T) {
432432
})
433433
}
434434

435-
func testAccDataSource_Type_httpAuth(t *testing.T) {
435+
func TestAccAppSyncDataSource_Type_httpAuth(t *testing.T) {
436436
ctx := acctest.Context(t)
437437
rName := fmt.Sprintf("tfacctest%d", sdkacctest.RandInt())
438438
resourceName := "aws_appsync_datasource.test"
439439

440-
resource.Test(t, resource.TestCase{
440+
acctest.ParallelTest(ctx, t, resource.TestCase{
441441
PreCheck: func() { acctest.PreCheck(ctx, t); acctest.PreCheckPartitionHasService(t, names.AppSyncEndpointID) },
442442
ErrorCheck: acctest.ErrorCheck(t, names.AppSyncServiceID),
443443
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
@@ -466,12 +466,12 @@ func testAccDataSource_Type_httpAuth(t *testing.T) {
466466
})
467467
}
468468

469-
func testAccDataSource_Type_relationalDatabase(t *testing.T) {
469+
func TestAccAppSyncDataSource_Type_relationalDatabase(t *testing.T) {
470470
ctx := acctest.Context(t)
471471
rName := fmt.Sprintf("tfacctest%d", sdkacctest.RandInt())
472472
resourceName := "aws_appsync_datasource.test"
473473

474-
resource.Test(t, resource.TestCase{
474+
acctest.ParallelTest(ctx, t, resource.TestCase{
475475
PreCheck: func() { acctest.PreCheck(ctx, t); acctest.PreCheckPartitionHasService(t, names.AppSyncEndpointID) },
476476
ErrorCheck: acctest.ErrorCheck(t, names.AppSyncServiceID),
477477
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
@@ -495,12 +495,12 @@ func testAccDataSource_Type_relationalDatabase(t *testing.T) {
495495
})
496496
}
497497

498-
func testAccDataSource_Type_relationalDatabaseWithOptions(t *testing.T) {
498+
func TestAccAppSyncDataSource_Type_relationalDatabaseWithOptions(t *testing.T) {
499499
ctx := acctest.Context(t)
500500
rName := fmt.Sprintf("tfacctest%d", sdkacctest.RandInt())
501501
resourceName := "aws_appsync_datasource.test"
502502

503-
resource.Test(t, resource.TestCase{
503+
acctest.ParallelTest(ctx, t, resource.TestCase{
504504
PreCheck: func() { acctest.PreCheck(ctx, t); acctest.PreCheckPartitionHasService(t, names.AppSyncEndpointID) },
505505
ErrorCheck: acctest.ErrorCheck(t, names.AppSyncServiceID),
506506
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
@@ -526,14 +526,14 @@ func testAccDataSource_Type_relationalDatabaseWithOptions(t *testing.T) {
526526
})
527527
}
528528

529-
func testAccDataSource_Type_lambda(t *testing.T) {
529+
func TestAccAppSyncDataSource_Type_lambda(t *testing.T) {
530530
ctx := acctest.Context(t)
531531
rName := fmt.Sprintf("tfacctest%d", sdkacctest.RandInt())
532532
iamRoleResourceName := "aws_iam_role.test"
533533
lambdaFunctionResourceName := "aws_lambda_function.test"
534534
resourceName := "aws_appsync_datasource.test"
535535

536-
resource.Test(t, resource.TestCase{
536+
acctest.ParallelTest(ctx, t, resource.TestCase{
537537
PreCheck: func() { acctest.PreCheck(ctx, t); acctest.PreCheckPartitionHasService(t, names.AppSyncEndpointID) },
538538
ErrorCheck: acctest.ErrorCheck(t, names.AppSyncServiceID),
539539
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
@@ -558,14 +558,14 @@ func testAccDataSource_Type_lambda(t *testing.T) {
558558
})
559559
}
560560

561-
func testAccDataSource_Type_eventBridge(t *testing.T) {
561+
func TestAccAppSyncDataSource_Type_eventBridge(t *testing.T) {
562562
ctx := acctest.Context(t)
563563
rName := fmt.Sprintf("tfacctest%d", sdkacctest.RandInt())
564564
iamRoleResourceName := "aws_iam_role.test"
565565
eventBusResourceName := "aws_cloudwatch_event_bus.test"
566566
resourceName := "aws_appsync_datasource.test"
567567

568-
resource.Test(t, resource.TestCase{
568+
acctest.ParallelTest(ctx, t, resource.TestCase{
569569
PreCheck: func() { acctest.PreCheck(ctx, t); acctest.PreCheckPartitionHasService(t, names.AppSyncEndpointID) },
570570
ErrorCheck: acctest.ErrorCheck(t, names.AppSyncServiceID),
571571
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
@@ -590,12 +590,12 @@ func testAccDataSource_Type_eventBridge(t *testing.T) {
590590
})
591591
}
592592

593-
func testAccDataSource_Type_none(t *testing.T) {
593+
func TestAccAppSyncDataSource_Type_none(t *testing.T) {
594594
ctx := acctest.Context(t)
595595
rName := fmt.Sprintf("tfacctest%d", sdkacctest.RandInt())
596596
resourceName := "aws_appsync_datasource.test"
597597

598-
resource.Test(t, resource.TestCase{
598+
acctest.ParallelTest(ctx, t, resource.TestCase{
599599
PreCheck: func() { acctest.PreCheck(ctx, t); acctest.PreCheckPartitionHasService(t, names.AppSyncEndpointID) },
600600
ErrorCheck: acctest.ErrorCheck(t, names.AppSyncServiceID),
601601
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,

0 commit comments

Comments
 (0)