Fixed failing test

This commit is contained in:
Brett Mack 2015-11-18 12:54:18 +00:00
parent 29dfc4322e
commit b0fdf8a032
2 changed files with 2 additions and 9 deletions

View File

@ -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) &&

View File

@ -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