terraform-provider-vcd icon indicating copy to clipboard operation
terraform-provider-vcd copied to clipboard

Flaky test fixes

Open Didainius opened this issue 2 years ago • 0 comments

  • TestAccVcdNsxVdcGroupResources test import of sometimes fails due to vcd_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 test TestAccVcdNsxtDynamicSecurityGroupIntegration removed "Allow all traffic" firewall rule. It is normal, because vcd_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 using resetFirewall function.

Didainius avatar Oct 12 '22 11:10 Didainius