@@ -416,7 +416,7 @@ func TestAccProfilesWarehouseResource_SchemaNameHandling(t *testing.T) {
416
416
417
417
func TestDetermineSchemaNameForUpdate (t * testing.T ) {
418
418
// Test the determineSchemaNameForUpdate function that prevents API failures
419
- // when the schema name already exists in the warehouse configuration
419
+ // when the schema name already exists in the warehouse configuration.
420
420
tests := []struct {
421
421
name string
422
422
planSchemaName types.String
@@ -501,7 +501,7 @@ func TestDetermineSchemaNameForUpdate(t *testing.T) {
501
501
// Test the actual function
502
502
result := determineSchemaNameForUpdate (tt .planSchemaName , tt .stateSchemaName )
503
503
504
- // Check if the result matches expected
504
+ // Check if the result matches expected.
505
505
if ! compareStringPointers (result , tt .expectedResult ) {
506
506
t .Errorf ("Test case '%s' failed: %s\n Expected: %v, but got: %v" ,
507
507
tt .name , tt .description , tt .expectedResult , result )
@@ -510,18 +510,20 @@ func TestDetermineSchemaNameForUpdate(t *testing.T) {
510
510
}
511
511
}
512
512
513
- // Helper function to create string pointers for test cases
513
+ // Helper function to create string pointers for test cases.
514
514
func stringPtr (s string ) * string {
515
515
return & s
516
516
}
517
517
518
- // Helper function to compare string pointers
518
+ // Helper function to compare string pointers.
519
519
func compareStringPointers (a , b * string ) bool {
520
520
if a == nil && b == nil {
521
521
return true
522
522
}
523
+
523
524
if a == nil || b == nil {
524
525
return false
525
526
}
527
+
526
528
return * a == * b
527
529
}
0 commit comments