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

Ability to test whether warnings are raised during test steps #69

Open
smaeda-ks opened this issue Jan 28, 2022 · 5 comments
Open

Ability to test whether warnings are raised during test steps #69

smaeda-ks opened this issue Jan 28, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@smaeda-ks
Copy link

SDK version

N/A

Use-cases

Currently, ExpectError field only allows checking errors, not warnings. This makes provider developers hard to test certain scenarios where warnings are expected and want to validate the exact behavior in tests.

Attempted Solutions

N/A

Proposal

N/A

References

https://discuss.hashicorp.com/t/how-to-test-warnings/34259

@arxeiss
Copy link

arxeiss commented Jan 20, 2023

Any plan on this? I would like to test some warnings as well.

@bendbennett
Copy link
Contributor

Hi @arxeiss 👋

Thank you for your interest.

We are currently in the process of porting the code that forms the basis for testing from SDKv2 to a separate terraform-plugin-testing repository. This will be finalised and announced in the near future.

One of the first features that is being added to terraform-plugin-testing will be the ability to test whether warnings are raised during test steps.

@arxeiss
Copy link

arxeiss commented Jan 23, 2023

Amazing, thanks

@bendbennett
Copy link
Contributor

Unfortunately we have uncovered an issue during the implementation of the PR for Add ability to test whether warnings are raised during test steps. The issue is detailed in a comment on that PR. Consequently, the changes outlined in this issue will be scheduled for later in the year as part of an effort to modernize the acceptance testing framework. Apologies for any inconvenience.

@bflad
Copy link
Contributor

bflad commented Feb 28, 2023

I'm going to transfer this issue so any existing subscribers, etc. can track updates over in the new repository.

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

5 participants