Skip to content

Commit

Permalink
Fix Test_NsxtSecurityGroupGetAssociatedVms (#498)
Browse files Browse the repository at this point in the history
  • Loading branch information
Didainius authored Aug 23, 2022
1 parent f67f632 commit ea81c49
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .changes/v2.17.0/498-improvements.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Fix Test_NsxtSecurityGroupGetAssociatedVms which had name clash [GH-498]
6 changes: 3 additions & 3 deletions govcd/nsxt_firewall_group_static_security_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (vcd *TestVCD) Test_NsxtSecurityGroupGetAssociatedVms(check *C) {

// VMs are prependend to cleanup list to make sure they are removed before routed network
standaloneVm := createStandaloneVm(check, vcd, nsxtVdc, routedNet)
PrependToCleanupList(standaloneVm.VM.ID, "standaloneVm", "", check.TestName())
PrependToCleanupList(standaloneVm.VM.ID, "standaloneVm", "", standaloneVm.VM.Name)

secGroupDefinition := &types.NsxtFirewallGroup{
Name: check.TestName(),
Expand Down Expand Up @@ -208,10 +208,10 @@ func createNsxtRoutedNetwork(check *C, vcd *TestVCD, vdc *Vdc, edgeGatewayId str

func createStandaloneVm(check *C, vcd *TestVCD, vdc *Vdc, net *OpenApiOrgVdcNetwork) *VM {
params := types.CreateVmParams{
Name: check.TestName(),
Name: check.TestName() + "-standalone",
PowerOn: false,
CreateVm: &types.Vm{
Name: check.TestName(),
Name: check.TestName() + "-standalone",
VirtualHardwareSection: nil,
NetworkConnectionSection: &types.NetworkConnectionSection{
Info: "Network Configuration for VM",
Expand Down

0 comments on commit ea81c49

Please sign in to comment.