Skip to content

Commit

Permalink
lint comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ShiriMoran committed Jan 4, 2024
1 parent 0f00f59 commit a8901b7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pkg/ibmvpc/explainability_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,19 +299,22 @@ func TestQueryConnectionSG1(t *testing.T) {
if err5 != nil {
require.Fail(t, err5.Error())
}
require.Equal(t, "Connection protocol: UDP src-ports: 10-100 dst-ports: 443 exists between vsi1-ky[10.240.10.4] and Public Internet 161.26.0.0/16; its enabled by\n"+
require.Equal(t, "Connection protocol: UDP src-ports: 10-100 dst-ports: "+
"443 exists between vsi1-ky[10.240.10.4] and Public Internet 161.26.0.0/16; its enabled by\n"+
"Egress Rules:\n~~~~~~~~~~~~~\nSecurityGroupLayer Rules\n------------------------\nenabling rules from sg1-ky:\n"+
"\tindex: 2, direction: outbound, conns: protocol: udp, dstPorts: 1-65535, cidr: 161.26.0.0/16\n\n"+
"There is no connection \"protocol: UDP src-ports: 10-100 dst-ports: 443\" "+
"between vsi1-ky[10.240.10.4] and Public Internet 161.16.0.0-161.25.255.255,161.27.0.0-161.31.255.255; connection blocked by egress\n\n", explanbilityStr5)
"between vsi1-ky[10.240.10.4] and Public Internet 161.16.0.0-161.25.255.255,161.27.0.0-161.31.255.255; "+
"connection blocked by egress\n\n", explanbilityStr5)
fmt.Println(explanbilityStr5)

// test6: a connection does not exist regardless of the query
explanbilityStr6, err6 := vpcConfig.ExplainConnectivity("vsi1-ky[10.240.10.4]", "vsi3a-ky[10.240.30.5]", connectionUDP2)
if err6 != nil {
require.Fail(t, err6.Error())
}
require.Equal(t, "There is no connection \"protocol: UDP src-ports: 10-100 dst-ports: 443\" between vsi1-ky[10.240.10.4] and vsi3a-ky[10.240.30.5]; "+
require.Equal(t, "There is no connection \"protocol: UDP src-ports: 10-100 dst-ports: 443\" "+
"between vsi1-ky[10.240.10.4] and vsi3a-ky[10.240.30.5]; "+
"connection blocked both by ingress and egress\n\n", explanbilityStr6)
fmt.Println(explanbilityStr6)
fmt.Println("---------------------------------------------------------------------------------------------------------------------------")
Expand Down

0 comments on commit a8901b7

Please sign in to comment.