I' having this kind of issue: This is my test case to test against azure resource created or no.
package test
import (
"testing"
"github.com/gruntwork-io/terratest/modules/azure"
"github.com/stretchr/testify/assert"
)
func TestResourceGroupExists(t *testing.T) {
resourceGroupName := "myResourceGroup"
// Check if the resource group exists
exists, err := azure.ResourceGroupExistsE(t, resourceGroupName)
// Assert that there are no errors and the resource group exists
assert.NoError(t, err)
assert.True(t, exists, "Resource group does not exist.")
}
and when I'm executing this code via such command: [go test -v] I get this kind of error:
./main_test.go:14:44: cannot use t (variable of type *"testing".T) as type string in argument to azure.ResourceGroupExistsE
FAIL terratest [build failed]
I have executed this command for installing the go dependencies. [go mod tidy]