@@ -162,7 +162,7 @@ func TestAccProfilesWarehouseResource(t *testing.T) {
162
162
resource .Test (t , resource.TestCase {
163
163
ProtoV6ProviderFactories : testAccProtoV6ProviderFactories ,
164
164
Steps : []resource.TestStep {
165
- // Create and Read testing
165
+ // Create and Read testing.
166
166
{
167
167
Config : providerConfig + `
168
168
resource "segment_profiles_warehouse" "test" {
@@ -186,7 +186,7 @@ func TestAccProfilesWarehouseResource(t *testing.T) {
186
186
resource .TestCheckResourceAttr ("segment_profiles_warehouse.test" , "schema_name" , "my-schema-name" ),
187
187
),
188
188
},
189
- // ImportState testing
189
+ // ImportState testing.
190
190
{
191
191
ResourceName : "segment_profiles_warehouse.test" ,
192
192
Config : providerConfig + `
@@ -204,7 +204,7 @@ func TestAccProfilesWarehouseResource(t *testing.T) {
204
204
ImportState : true ,
205
205
ImportStateId : "my-space-id:my-warehouse-id" ,
206
206
},
207
- // Update and Read testing
207
+ // Update and Read testing.
208
208
{
209
209
Config : providerConfig + `
210
210
resource "segment_profiles_warehouse" "test" {
@@ -227,14 +227,14 @@ func TestAccProfilesWarehouseResource(t *testing.T) {
227
227
resource .TestCheckResourceAttr ("segment_profiles_warehouse.test" , "settings" , "{\" token\" :\" my-other-token\" }" ),
228
228
resource .TestCheckResourceAttr ("segment_profiles_warehouse.test" , "schema_name" , "my-new-schema-name" )),
229
229
},
230
- // Delete testing automatically occurs in TestCase
230
+ // Delete testing automatically occurs in TestCase.
231
231
},
232
232
})
233
233
}
234
234
235
235
func TestAccProfilesWarehouseResource_SchemaNameHandling (t * testing.T ) {
236
236
// Test the schemaName handling that prevents API failures when the schema
237
- // name already exists in the warehouse configuration
237
+ // name already exists in the warehouse configuration.
238
238
t .Parallel ()
239
239
240
240
updateCount := 0
@@ -244,7 +244,7 @@ func TestAccProfilesWarehouseResource_SchemaNameHandling(t *testing.T) {
244
244
245
245
payload := ""
246
246
if req .URL .Path == "/spaces/my-space-id/profiles-warehouses" && req .Method == http .MethodPost {
247
- // Initial create response
247
+ // Initial create response.
248
248
payload = `
249
249
{
250
250
"data": {
@@ -275,7 +275,7 @@ func TestAccProfilesWarehouseResource_SchemaNameHandling(t *testing.T) {
275
275
}
276
276
`
277
277
} else if req .URL .Path == "/spaces/my-space-id/profiles-warehouses/my-warehouse-id" && req .Method == http .MethodPatch {
278
- // Update response - schemaName should only be sent when it changes
278
+ // Update response - schemaName should only be sent when it changes.
279
279
updateCount ++
280
280
payload = `
281
281
{
@@ -307,7 +307,7 @@ func TestAccProfilesWarehouseResource_SchemaNameHandling(t *testing.T) {
307
307
}
308
308
`
309
309
} else if req .URL .Path == "/spaces/my-space-id/profiles-warehouses" && req .Method == http .MethodGet {
310
- // Read response
310
+ // Read response.
311
311
payload = `
312
312
{
313
313
"data": {
@@ -356,7 +356,7 @@ func TestAccProfilesWarehouseResource_SchemaNameHandling(t *testing.T) {
356
356
resource .Test (t , resource.TestCase {
357
357
ProtoV6ProviderFactories : testAccProtoV6ProviderFactories ,
358
358
Steps : []resource.TestStep {
359
- // Create with schema_name
359
+ // Create with schema_name.
360
360
{
361
361
Config : providerConfig + `
362
362
resource "segment_profiles_warehouse" "test" {
@@ -374,7 +374,7 @@ func TestAccProfilesWarehouseResource_SchemaNameHandling(t *testing.T) {
374
374
resource .TestCheckResourceAttr ("segment_profiles_warehouse.test" , "schema_name" , "my-schema-name" ),
375
375
),
376
376
},
377
- // Update with same schema_name - should not send schemaName to API (prevents API failure)
377
+ // Update with same schema_name - should not send schemaName to API (prevents API failure).
378
378
{
379
379
Config : providerConfig + `
380
380
resource "segment_profiles_warehouse" "test" {
@@ -392,7 +392,7 @@ func TestAccProfilesWarehouseResource_SchemaNameHandling(t *testing.T) {
392
392
resource .TestCheckResourceAttr ("segment_profiles_warehouse.test" , "schema_name" , "my-schema-name" ),
393
393
),
394
394
},
395
- // Update with different schema_name - should send schemaName to API (legitimate change)
395
+ // Update with different schema_name - should send schemaName to API (legitimate change).
396
396
{
397
397
Config : providerConfig + `
398
398
resource "segment_profiles_warehouse" "test" {
@@ -415,6 +415,8 @@ func TestAccProfilesWarehouseResource_SchemaNameHandling(t *testing.T) {
415
415
}
416
416
417
417
func TestDetermineSchemaNameForUpdate (t * testing.T ) {
418
+ t .Parallel ()
419
+
418
420
// Test the determineSchemaNameForUpdate function that prevents API failures
419
421
// when the schema name already exists in the warehouse configuration.
420
422
tests := []struct {
@@ -498,7 +500,9 @@ func TestDetermineSchemaNameForUpdate(t *testing.T) {
498
500
499
501
for _ , tt := range tests {
500
502
t .Run (tt .name , func (t * testing.T ) {
501
- // Test the actual function
503
+ t .Parallel ()
504
+
505
+ // Test the actual function.
502
506
result := determineSchemaNameForUpdate (tt .planSchemaName , tt .stateSchemaName )
503
507
504
508
// Check if the result matches expected.
0 commit comments