Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to amend TestAccVcdNsxtDynamicSecurityGroupVdcGroupCriteriaWithVm #980

Merged
merged 2 commits into from
Jan 9, 2023

Conversation

adambarreiro
Copy link
Collaborator

@adambarreiro adambarreiro commented Jan 9, 2023

This PR tries to solve the following test failure that is intermittent and difficult to catch:

=== RUN   TestAccVcdNsxtDynamicSecurityGroupVdcGroupCriteriaWithVms
    resource_vcd_nsxt_dynamic_security_group_test.go:438: Step 2/4 error: Error running post-apply plan: exit status 1
        
        Error: [nsxt dynamic security group data source read] error getting NSX-T dynamic security group: could not find NSX-T Firewall Group with name 'TestAccVcdNsxtDynamicSecurityGroupVdcGroupCriteriaWithVms-group2': error getting all pages for endpoint https://my-super-duper-vcd.company.com/cloudapi/1.0.0/firewallGroups/summaries: error in HTTP GET request: BAD_REQUEST - Cannot parse the supplied filter: typeValue==VM_CRITERIA;ownerRef.id==urn:vcloud:vdcGroup:65aff636-d9ef-4aca-b4ca-3132f6346fde;name==TestAccVcdNsxtDynamicSecurityGroupVdcGroupCriteriaWithVms-group2
        
          with data.vcd_nsxt_dynamic_security_group.group2,
          on terraform_plugin_test.tf line 164, in data "vcd_nsxt_dynamic_security_group" "group2":
         164: data "vcd_nsxt_dynamic_security_group" "group2" {
        
--- FAIL: TestAccVcdNsxtDynamicSecurityGroupVdcGroupCriteriaWithVms (156.58s)

The hypothesis is that the name could be too long and sometimes it could break the VCD API filter, but this is not 100% sure.
This PR changes the used name to shorter ones, like
name==DSGVdcGroupCritWithVms-2

We should check in future whether this test continues to fail despite this change.

…s that sometimes fails due to bad filter

Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
@adambarreiro adambarreiro changed the title Try to amend TestAccVcdNsxtDynamicSecurityGroupVdcGroupCriteriaWithVm… Try to amend TestAccVcdNsxtDynamicSecurityGroupVdcGroupCriteriaWithVm Jan 9, 2023
@adambarreiro adambarreiro marked this pull request as ready for review January 9, 2023 12:40
@adambarreiro adambarreiro self-assigned this Jan 9, 2023
@adambarreiro adambarreiro merged commit 3dd7d3b into vmware:main Jan 9, 2023
@adambarreiro adambarreiro deleted the amend-test-quirk branch January 9, 2023 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants