@@ -27,14 +27,14 @@ import (
2727
2828func 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" )
0 commit comments