Skip to content

Commit 8fe8bc1

Browse files
committed
lint
1 parent 94454e9 commit 8fe8bc1

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

internal/provider/profiles_warehouse_resource.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,9 +368,10 @@ func findProfileWarehouse(authContext context.Context, client *api.APIClient, id
368368
// based on comparing the plan and state values. This prevents API failures when the
369369
// schema name already exists in the warehouse configuration.
370370
func determineSchemaNameForUpdate(planSchemaName, stateSchemaName types.String) *string {
371-
// Only send schemaName to API if it differs from the remote state
371+
// Only send schemaName to API if it differs from the remote state.
372372
if !planSchemaName.Equal(stateSchemaName) {
373373
return planSchemaName.ValueStringPointer()
374374
}
375+
375376
return nil
376377
}

internal/provider/profiles_warehouse_resource_test.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ func TestAccProfilesWarehouseResource_SchemaNameHandling(t *testing.T) {
416416

417417
func TestDetermineSchemaNameForUpdate(t *testing.T) {
418418
// 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.
420420
tests := []struct {
421421
name string
422422
planSchemaName types.String
@@ -501,7 +501,7 @@ func TestDetermineSchemaNameForUpdate(t *testing.T) {
501501
// Test the actual function
502502
result := determineSchemaNameForUpdate(tt.planSchemaName, tt.stateSchemaName)
503503

504-
// Check if the result matches expected
504+
// Check if the result matches expected.
505505
if !compareStringPointers(result, tt.expectedResult) {
506506
t.Errorf("Test case '%s' failed: %s\nExpected: %v, but got: %v",
507507
tt.name, tt.description, tt.expectedResult, result)
@@ -510,18 +510,20 @@ func TestDetermineSchemaNameForUpdate(t *testing.T) {
510510
}
511511
}
512512

513-
// Helper function to create string pointers for test cases
513+
// Helper function to create string pointers for test cases.
514514
func stringPtr(s string) *string {
515515
return &s
516516
}
517517

518-
// Helper function to compare string pointers
518+
// Helper function to compare string pointers.
519519
func compareStringPointers(a, b *string) bool {
520520
if a == nil && b == nil {
521521
return true
522522
}
523+
523524
if a == nil || b == nil {
524525
return false
525526
}
527+
526528
return *a == *b
527529
}

0 commit comments

Comments
 (0)