hashicorp / hashicorp/terraform-plugin-testing

Ability to test whether warnings are raised during test steps

Open
#69 5 comments 10 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
68
Forks
22
Avg merge
2d 12h
Merged PRs (30d)
1

Description

### SDK version
N/A

### Use-cases

Currently, `ExpectError` [field](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-sdk/helper/resource#TestStep) 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.