Open harkamals opened 4 years ago
I'm not entirely sure why you'd want to do that. Tests already have their own runner. If you put this in a _test.go file, you can run it with go test -run=RunMe
What are you trying to accomplish?
I ran into this same issue too: Gruntwork's terratest modules (like the terraform one) are very useful but, unsurprisingly, expect some kind of *testing.T variable. To get round this in my magefile I did this:
func Run{} {
t := testing.T{}
options := &terraform.Options{
Parallelism: 1,
}
terraform.Init(&t, options)
}
How can I use mage to run a testing function
$ mage runme Unknown target specified: runme