mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-15 01:53:51 -06:00
Fixed failing test
This commit is contained in:
parent
29dfc4322e
commit
b0fdf8a032
@ -184,13 +184,6 @@ func deleteFirewallRules(d *schema.ResourceData, gateway *types.EdgeGateway) []*
|
||||
func matchFirewallRule(d *schema.ResourceData, prefix string, rules []*types.FirewallRule) (string, error) {
|
||||
|
||||
for _, m := range rules {
|
||||
log.Printf("[INFO] %s - %s", d.Get(prefix+".description").(string), m.Description)
|
||||
log.Printf("[INFO] %s - %s", d.Get(prefix+".policy").(string), m.Policy)
|
||||
log.Printf("[INFO] %s - %s", d.Get(prefix+".protocol").(string), getProtocol(*m.Protocols))
|
||||
log.Printf("[INFO] %s - %s", d.Get(prefix+".destination_port").(string), getPortString(m.Port))
|
||||
log.Printf("[INFO] %s - %s", strings.ToLower(d.Get(prefix+".destination_ip").(string)), strings.ToLower(m.DestinationIP))
|
||||
log.Printf("[INFO] %s - %s", d.Get(prefix+".source_port").(string), getPortString(m.SourcePort))
|
||||
log.Printf("[INFO] %s - %s", strings.ToLower(d.Get(prefix+".source_ip").(string)), strings.ToLower(m.SourceIP))
|
||||
if d.Get(prefix+".description").(string) == m.Description &&
|
||||
d.Get(prefix+".policy").(string) == m.Policy &&
|
||||
strings.ToLower(d.Get(prefix+".protocol").(string)) == getProtocol(*m.Protocols) &&
|
||||
|
@ -32,7 +32,7 @@ func TestAccVcdVApp_PowerOff(t *testing.T) {
|
||||
),
|
||||
},
|
||||
resource.TestStep{
|
||||
Config: testAccCheckVcdVApp_powerOff,
|
||||
Config: fmt.Sprintf(testAccCheckVcdVApp_powerOff, os.Getenv("VCD_EDGE_GATWEWAY")),
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
testAccCheckVcdVAppExists("vcd_vapp.foobar", &vapp),
|
||||
testAccCheckVcdVAppAttributes_off(&vapp),
|
||||
@ -83,7 +83,7 @@ func testAccCheckVcdVAppDestroy(s *terraform.State) error {
|
||||
_, err := conn.OrgVdc.FindVAppByName(rs.Primary.ID)
|
||||
|
||||
if err == nil {
|
||||
return fmt.Errorf("VPCs still exist.")
|
||||
return fmt.Errorf("VPCs still exist")
|
||||
}
|
||||
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user