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

Fix Test_NsxtSecurityGroupGetAssociatedVms #498

Merged

Conversation

Didainius
Copy link
Collaborator

@Didainius Didainius commented Aug 18, 2022

This PR fixes Test_NsxtSecurityGroupGetAssociatedVms. The reason for its failure is that the test creates a standalone VM and a VM within a vApp using the same name in VCD 10.4.

Sample error before this fix:

START: nsxt_firewall_group_static_security_group_test.go:106: TestVCD.Test_NsxtSecurityGroupGetAssociatedVms
nsxt_firewall_group_static_security_group_test.go:128:
// VMs are prependend to cleanup list to make sure they are removed before routed network
standaloneVm := createStandaloneVm(check, vcd, nsxtVdc, routedNet)
nsxt_firewall_group_static_security_group_test.go:270:
check.Assert(err, IsNil)
... value *errors.errorString = &errors.errorString{s:"error creating standalone VM: API Error: 400: [ a355e5d1-be85-4bbe-89bd-28298b405da7 ] The VMware Cloud Director entity TestVCD.Test_NsxtSecurityGroupGetAssociatedVms already exists."} ("error creating standalone VM: API Error: 400: [ a355e5d1-be85-4bbe-89bd-28298b405da7 ] The VMware Cloud Director entity TestVCD.Test_NsxtSecurityGroupGetAssociatedVms already exists.")

FAIL: nsxt_firewall_group_static_security_group_test.go:106: TestVCD.Test_NsxtSecurityGroupGetAssociatedVms

Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
@Didainius Didainius marked this pull request as ready for review August 18, 2022 07:37
@Didainius Didainius removed the request for review from adambarreiro August 18, 2022 07:37
Copy link
Collaborator

@lvirbalas lvirbalas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few asks and LGTM:

  • There's a typo in PR name.
  • Would be nice to know exactly what has changed and in which CD version (and report that in the description). Would be good to know exact cause.

@Didainius Didainius changed the title Fx Test_NsxtSecurityGroupGetAssociatedVms Fix Test_NsxtSecurityGroupGetAssociatedVms Aug 19, 2022
@Didainius
Copy link
Collaborator Author

Didainius commented Aug 19, 2022

  • There's a typo in PR name.

Fixed.

  • Would be nice to know exactly what has changed and in which CD version (and report that in the description). Would be good to know exact cause.

For example on 10.2.0.17008054 and 10.3.3.20027910 this test works without patch.

@Didainius Didainius merged commit ea81c49 into vmware:main Aug 23, 2022
@Didainius Didainius deleted the fix-Test_NsxtSecurityGroupGetAssociatedVms branch August 23, 2022 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants