hashicorp / hashicorp/terraform-plugin-testing
`ConfigStateChecks` isn't Compatible with `RefreshState`
- Dominant language
- Go
- Stars
- 68
- Forks
- 22
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 1
Description
```
=== RUN TestAccResourceInstance_withLock
resource_test.go:3511: Test validation error: TestStep 2/2 validation error: TestStep ConfigStateChecks must only be specified with Config, ConfigDirectory or ConfigFile
```
Sample code:
```go
resource.TestStep{
RefreshState: true,
ConfigStateChecks: []statecheck.StateCheck{
statecheck.ExpectKnownValue(
resourceName,
tfjsonpath.New("some_attr"),
knownvalue.StringExact("some_string_value"),
),
},
}
```
Is there any way to assert the some known values for state of some attributes on a resource when `RefreshState: true`?
Query mode seems to be too complicated and I am not really testing for `terraform query` command.
Contributor guide
Assessment
This issue has not been assessed yet.