terraform-provider-vcd
terraform-provider-vcd copied to clipboard
Flaky test fixes
-
TestAccVcdNsxVdcGroupResources
test import of sometimes fails due tovcd_nsxt_ipsec_vpn_tunnel
changing states as the test progresses. The solution is to ignore validation of these fields on import test.
=== RUN TestAccVcdNsxVdcGroupResources
resource_vcd_vdc_group_common_test.go:667: ImportStateVerify attributes not equivalent. Difference is shown below. Top is actual, bottom is expected.
(map[string]string) (len=2) {
(string) (len=18) "ike_service_status": (string) (len=11) "NEGOTIATING",
(string) (len=6) "status": (string) (len=4) "DOWN"
}
(map[string]string) (len=2) {
(string) (len=18) "ike_service_status": (string) "",
(string) (len=6) "status": (string) ""
}
--- FAIL: TestAccVcdNsxVdcGroupResources (277.36s)
-
TestAccVcdOrgGroup
was failing because of inaccessible LDAP container. It was because testTestAccVcdNsxtDynamicSecurityGroupIntegration
removed "Allow all traffic" firewall rule. It is normal, becausevcd_nsxt_firewall
destroy operation removed preprovisioned firewall rule. The soluation was to skip this test for binary tests and restore firewall rule after test run usingresetFirewall
function.