Unable to Mock the PowerCLI: Get-View command in the code coverage #2625
vinayakorrapati
started this conversation in
General
Replies: 1 comment
-
The mocked Docs for |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Wrote the powershell script to get ch the cluster and related host information using the:
Get-View -Server $vcenter -ViewType ClusterComputeResource -ErrorAction stop
Mocking the view with:
When we execute the test case :
$result = & $newscriptPath -vcenter $vcenter -VCenterCreds $mockVCenterCreds
Facing the below issue:
Tried multiple ways. KIndly give the suggestions to fix this issue.
Beta Was this translation helpful? Give feedback.
All reactions