Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tfsdklog: Consider Test Sink Support for Acceptance Test Sweepers (No testing.T) #161

Open
bflad opened this issue Jun 16, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@bflad
Copy link
Member

bflad commented Jun 16, 2023

terraform-plugin-log version

v0.9.0

Use cases

The provider acceptance testing frameworks offer "sweeper" functionality, which is used to automatically clean up testing environments. That testing-based code has logging that is not currently controlled by terraform-plugin-log or environment variables. Code for reference: https://github.com/hashicorp/terraform-plugin-testing/blob/dfd28ce3509bb39a5106844f7d4a8516dcab512e/helper/resource/testing.go#L96-L284

Attempted solutions

The tfsdklog package has RegisterTestSink(), however that requires a testing.T which is not available in this use case.

Proposal

Add a new tfsdklog package function similar to RegisterTestSink, that can be used within the sweeper code.

References

None

@bflad bflad added the enhancement New feature or request label Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant