Skip to content

Commit

Permalink
Updating website docs (#1069)
Browse files Browse the repository at this point in the history
  • Loading branch information
bendbennett committed Oct 11, 2022
1 parent 034a8b7 commit bc221f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion helper/resource/teststep_providers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1624,7 +1624,6 @@ func TestTest_TestStep_ProviderFactories_Refresh_Inline(t *testing.T) {
Check: TestCheckResourceAttr("random_password.test", "min_special", "10"),
},
{
Config: `resource "random_password" "test" { }`,
RefreshState: true,
Check: TestCheckResourceAttr("random_password.test", "min_special", "2"),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ under test.

## Test Modes

Terraform’s test framework facilitates two distinct modes of acceptance tests,
_Lifecycle_ and _Import_.
Terraform’s test framework facilitates three distinct modes of acceptance tests,
_Lifecycle_, _Import_ and _Refresh_.

_Lifecycle_ mode is the most common mode, and is used for testing plugins by
providing one or more configuration files with the same logic as would be used
Expand All @@ -25,6 +25,10 @@ _Import_ mode is used for testing resource functionality to import existing
infrastructure into a Terraform statefile, using the same logic as would be used
when running `terraform import`.

_Refresh_ mode is used for testing resource functionality to refresh existing
infrastructure, using the same logic as would be used when running
`terraform refresh`.

An acceptance test’s mode is implicitly determined by the fields provided in the
`TestStep` definition. The applicable fields are defined in the [TestStep
Reference API](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-sdk/helper/resource#TestStep).
Expand Down

0 comments on commit bc221f7

Please sign in to comment.