VCD 10.2 is going EOL for 2022-10-15 and the next release is going to be later than that therefore bumping default API version to V36.0. (for those with explicit needs there is an option to override the default version by using GOVCD_API_VERSION environment variable).
Additionally, this PR removes conditional checks that were being used for versions < 36.0
It should also fix all currently known flaky tests, which should make test run clean:
Test TestClient_getloginurl started failing immediately because it relied on a matching path which has changed.
VCD introduced new state for VM PARTIALLY_POWERED_OFF in 10.3. Test Test_VMToggleHardwareVirtualization failed because function ToggleHardwareVirtualization specifically relied on VM being POWERED_OFF. This function is adjusted to also match PARTIALLY_POWERED_OFF
START: vm_test.go:610: TestVCD.Test_VMToggleHardwareVirtualization
vm_test.go:646:
check.Assert(err, IsNil)
... value *errors.errorString = &errors.errorString{s:"hardware virtualization can be changed from powered off state, status: PARTIALLY_POWERED_OFF"} ("hardware virtualization can be changed from powered off state, status: PARTIALLY_POWERED_OFF")
* Fix `Test_RemoveAllNetworks` by ensureing vApp is powered off before removing all networks.
START: vapp_test.go:611: TestVCD.Test_RemoveAllNetworks
vapp_test.go:670:
check.Assert(err, IsNil)
... value *errors.errorString = &errors.errorString{s:"task did not complete successfully: [409:INVALID_STATE] - [ 35010cb4-48ac-4fe2
-a4c2-f6af984e243c ] The requested operation could not be executed on vApp \"f54723e7-638f-4255-8ca0-0255c9c93e29\". Stop the vApp and
try again."} ("task did not complete successfully: [409:INVALID_STATE] - [ 35010cb4-48ac-4fe2-a4c2-f6af984e243c ] The requested oper
ation could not be executed on vApp \"f54723e7-638f-4255-8ca0-0255c9c93e29\". Stop the vApp and try again.")
VCD 10.2 is going EOL for 2022-10-15 and the next release is going to be later than that therefore bumping default API version to V36.0. (for those with explicit needs there is an option to override the default version by using
GOVCD_API_VERSION
environment variable).Additionally, this PR removes conditional checks that were being used for versions < 36.0
It should also fix all currently known flaky tests, which should make test run clean:
From
To
Test
TestClient_getloginurl
started failing immediately because it relied on a matching path which has changed.PARTIALLY_POWERED_OFF
in 10.3. TestTest_VMToggleHardwareVirtualization
failed because functionToggleHardwareVirtualization
specifically relied on VM beingPOWERED_OFF
. This function is adjusted to also matchPARTIALLY_POWERED_OFF
FAIL: vm_test.go:610: TestVCD.Test_VMToggleHardwareVirtualization
START: vm_test.go:666: TestVCD.Test_VMPowerOnPowerOff vm_test.go:710: check.Assert(vmStatus, Equals, "POWERED_OFF") ... obtained string = "PARTIALLY_POWERED_OFF" ... expected string = "POWERED_OFF"
FAIL: vm_test.go:666: TestVCD.Test_VMPowerOnPowerOff
START: vapp_test.go:611: TestVCD.Test_RemoveAllNetworks vapp_test.go:670: check.Assert(err, IsNil) ... value *errors.errorString = &errors.errorString{s:"task did not complete successfully: [409:INVALID_STATE] - [ 35010cb4-48ac-4fe2 -a4c2-f6af984e243c ] The requested operation could not be executed on vApp \"f54723e7-638f-4255-8ca0-0255c9c93e29\". Stop the vApp and try again."} ("task did not complete successfully: [409:INVALID_STATE] - [ 35010cb4-48ac-4fe2-a4c2-f6af984e243c ] The requested oper ation could not be executed on vApp \"f54723e7-638f-4255-8ca0-0255c9c93e29\". Stop the vApp and try again.")
FAIL: vapp_test.go:611: TestVCD.Test_RemoveAllNetworks