mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Fixed null pointer panic during firewall rules test
This commit is contained in:
parent
cc54785b1c
commit
f140c15039
@ -78,7 +78,10 @@ func createFirewallRulesConfigs(existingRules *govcd.EdgeGateway) string {
|
|||||||
Href: os.Getenv("VCD_URL"),
|
Href: os.Getenv("VCD_URL"),
|
||||||
VDC: os.Getenv("VCD_VDC"),
|
VDC: os.Getenv("VCD_VDC"),
|
||||||
}
|
}
|
||||||
conn, _ := config.Client()
|
conn, err := config.Client()
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Sprintf(testAccCheckVcdFirewallRules_add, "", "")
|
||||||
|
}
|
||||||
edgeGateway, _ := conn.OrgVdc.FindEdgeGateway(os.Getenv("VCD_EDGE_GATWEWAY"))
|
edgeGateway, _ := conn.OrgVdc.FindEdgeGateway(os.Getenv("VCD_EDGE_GATWEWAY"))
|
||||||
*existingRules = edgeGateway
|
*existingRules = edgeGateway
|
||||||
log.Printf("[DEBUG] Edge gateway: %#v", edgeGateway)
|
log.Printf("[DEBUG] Edge gateway: %#v", edgeGateway)
|
||||||
|
Loading…
Reference in New Issue
Block a user