The issue seemed to be session related. When I define the Get-AzResource function in the BeforeAll, it works like a charm.
BeforeAll{functionGet-AzResource($name){$KeyObject=[PSCustomObject]@{ResourceGroupName="RG100-O"}Return$KeyObject}}Describe'Utility Unit Tests'-Tag'unit'{It" Retrieves storage context for a given storage account"{
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Solved!
The issue seemed to be session related. When I define the
Get-AzResource
function in theBeforeAll
, it works like a charm.