You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is intended to return false if the resource group doesn't exist, since that's what ResourceGroupExistsE is checking.
However, in fact, it returns an error:
Error: Received unexpected error:
resources.GroupsClient#Get: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code="ResourceGroupNotFound" Message="Resource group 'TerraTest-C9kIU3' could not be found."
The issue is that the function ResourceNotFoundErrorExists is checking for an error with the code ResourceNotFound:
But when checking for the existence of a resource group that doesn't exist, azure returns an error with the code ResourceGroupNotFound (as you can see in the error).
I suspect there needs to be a separate ResourceGroupNotFoundErrorExists function that can be called by ResourceGroupExistsE.
The text was updated successfully, but these errors were encountered:
In this function, there's a special check on the error returned by
GetResourceGroupE
:terratest/modules/azure/resourcegroup.go
Lines 23 to 27 in 23563d0
This is intended to return
false
if the resource group doesn't exist, since that's whatResourceGroupExistsE
is checking.However, in fact, it returns an error:
The issue is that the function
ResourceNotFoundErrorExists
is checking for an error with the codeResourceNotFound
:terratest/modules/azure/errors.go
Line 66 in 23563d0
But when checking for the existence of a resource group that doesn't exist, azure returns an error with the code
ResourceGroupNotFound
(as you can see in the error).I suspect there needs to be a separate
ResourceGroupNotFoundErrorExists
function that can be called byResourceGroupExistsE
.The text was updated successfully, but these errors were encountered: