Closed mjcorwin closed 8 months ago
Hi Mark, is this ready for review?
@whereandy yep, sorry about the delay. Good to go now, besides typo fixed workspaces data source test verifies default workspace is included. Feel much better about that than count.
Related to #25, this is my stab at getting acceptance tests off the ground.
Primarily based off other providers and their test cases:
Included test coverage:
Tests can be run via
TF_ACC=1 go test -v ./vantage
, and requireVANTAGE_API_TOKEN
to be set as an env var. Afaict, the tests work albeit I confirmed this running the tests and disabling resource cleanup.Opening this as a draft to get feedback. If we decide to go down this route, can add testing steps to readme, comments, etc.
NOTE:
Had to upgrade some core packages which brought in quite a few indirect dependencies. Not thrilled there in terms of risk of things breaking but at least it's working.
In its current state, writing and verifying tests can be a bit difficult. Debug logging from terraform leaves a lot to be desired, and I didn't see any logging from the vantage go client. Could be a simple case of adding logs, but I was hoping the terraform-plugin libs would have more baked in here.
I included an
acctest
package which appears to be a common pattern, although it only contains one function at the moment. Could be a case of YAGNI/overkill at this stage or for this provider.