Skip to content

Commit 89fd3c1

Browse files
committed
fix: apply gofmt formatting to test files
- Remove trailing whitespace from test files - Ensures CI formatting checks pass - No functional changes to code logic
1 parent 440ec8c commit 89fd3c1

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

cloudstack/resource_cloudstack_network_parse_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ import (
2727

2828
func TestParseCIDR(t *testing.T) {
2929
networkResource := resourceCloudStackNetwork()
30-
30+
3131
t.Run("L2 network should return empty map", func(t *testing.T) {
3232
config := map[string]interface{}{
3333
"type": "L2",
3434
}
35-
35+
3636
resourceData := schema.TestResourceDataRaw(t, networkResource.Schema, config)
37-
37+
3838
result, err := parseCIDR(resourceData, false)
3939
if err != nil {
4040
t.Errorf("Expected no error for L2 network, got: %v", err)
@@ -46,15 +46,15 @@ func TestParseCIDR(t *testing.T) {
4646
t.Errorf("Expected empty map for L2 network, got: %v", result)
4747
}
4848
})
49-
49+
5050
t.Run("L3 network with valid CIDR should parse correctly", func(t *testing.T) {
5151
config := map[string]interface{}{
5252
"type": "L3",
5353
"cidr": "10.0.0.0/16",
5454
}
55-
55+
5656
resourceData := schema.TestResourceDataRaw(t, networkResource.Schema, config)
57-
57+
5858
result, err := parseCIDR(resourceData, true)
5959
if err != nil {
6060
t.Errorf("Expected no error for L3 network with valid CIDR, got: %v", err)
@@ -69,14 +69,14 @@ func TestParseCIDR(t *testing.T) {
6969
t.Error("Expected netmask to be set")
7070
}
7171
})
72-
72+
7373
t.Run("L3 network without CIDR should return error", func(t *testing.T) {
7474
config := map[string]interface{}{
7575
"type": "L3",
7676
}
77-
77+
7878
resourceData := schema.TestResourceDataRaw(t, networkResource.Schema, config)
79-
79+
8080
_, err := parseCIDR(resourceData, true)
8181
if err == nil {
8282
t.Error("Expected error for L3 network without CIDR, but got none")

cloudstack/resource_cloudstack_network_validation_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727

2828
func TestResourceCloudStackNetworkSchema(t *testing.T) {
2929
networkResource := resourceCloudStackNetwork()
30-
30+
3131
// Test that required fields exist
3232
t.Run("Schema should have type field", func(t *testing.T) {
3333
if typeField, ok := networkResource.Schema["type"]; !ok {
@@ -47,7 +47,7 @@ func TestResourceCloudStackNetworkSchema(t *testing.T) {
4747
}
4848
}
4949
})
50-
50+
5151
t.Run("Schema should have cidr field as optional", func(t *testing.T) {
5252
if cidrField, ok := networkResource.Schema["cidr"]; !ok {
5353
t.Error("Schema should have 'cidr' field")
@@ -60,7 +60,7 @@ func TestResourceCloudStackNetworkSchema(t *testing.T) {
6060
}
6161
}
6262
})
63-
63+
6464
t.Run("Schema should have CustomizeDiff", func(t *testing.T) {
6565
if networkResource.CustomizeDiff == nil {
6666
t.Error("Resource should have CustomizeDiff function")

0 commit comments

Comments
 (0)