Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
Signed-off-by: abarreiro <[email protected]>
  • Loading branch information
abarreiro committed Jan 14, 2025
1 parent 5977164 commit 896299c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions govcd/tm_vdc_storage_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,10 @@ func (vcd *TestVCD) Test_TmVdcStoragePolicy(check *C) {
check.Assert(createdVdc, NotNil)
// Add to cleanup list
PrependToCleanupListOpenApi(createdVdc.TmVdc.ID, check.TestName(), types.OpenApiPathVcf+types.OpenApiEndpointTmVdcs+createdVdc.TmVdc.ID)
// TODO: TM: Does not work
/* defer func() {
defer func() {
err = createdVdc.Delete()
check.Assert(err, IsNil)
}()*/
}()

check.Assert(err, IsNil)
vdcPolicies, err := createdVdc.CreateStoragePolicies(&types.VirtualDatacenterStoragePolicies{
Expand All @@ -82,10 +81,11 @@ func (vcd *TestVCD) Test_TmVdcStoragePolicy(check *C) {
},
})
check.Assert(err, IsNil)
defer func() {
err = vdcPolicies[0].Delete()
check.Assert(err, IsNil)
}()
// TODO: TM: Does not work
//defer func() {
// err = vdcPolicies[0].Delete()
// check.Assert(err, IsNil)
//}()
check.Assert(len(vdcPolicies), Equals, 1)
check.Assert(vdcPolicies[0].VirtualDatacenterStoragePolicy, NotNil)

Expand Down

0 comments on commit 896299c

Please sign in to comment.