Skip to content

Acceptance testing provider using OpenTofu CLI #975

Closed Answered by Yantrio
alexhung asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @alexhung thank you for raising this.

I've tracked this down to a choice of hardcoding some parameters in the plugin testing code here

To work around this, when testing with tofu you can set the following environment variables:

TF_ACC_TERRAFORM_PATH="/path/to/opentofu"
TF_ACC_PROVIDER_NAMESPACE="hashicorp"
TF_ACC_PROVIDER_HOST="registry.opentofu.org"

I have successfully cloned and run the TestAccRemoteUpgradeFromVersionWithNoDisableProxyAttr test from your provider repository using these environment variables.

Please try this out and let us know how you get on! I'm happy to help with any other snags you hit whilst doing acceptance testing of providers with OpenTofu.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@alexhung
Comment options

@ghost
Comment options

Answer selected by alexhung
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants