Skip to content

Commit

Permalink
Reset time during test step so that ReadContext does not mutate state…
Browse files Browse the repository at this point in the history
… and result in a diff (#1069)
  • Loading branch information
bendbennett committed Oct 11, 2022
1 parent 4be309c commit 034a8b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions helper/resource/teststep_providers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1707,9 +1707,9 @@ func TestTest_TestStep_ProviderFactories_RefreshWithPlanModifier_Inline(t *testi
Check: TestCheckResourceAttr("random_password.test", "special", "true"),
},
{
Config: `resource "random_password" "test" { }`,
Check: TestCheckResourceAttr("random_password.test", "special", "false"),
ExpectNonEmptyPlan: true,
PreConfig: setTimeForTest(time.Now()),
Config: `resource "random_password" "test" { }`,
Check: TestCheckResourceAttr("random_password.test", "special", "false"),
},
},
})
Expand Down

0 comments on commit 034a8b7

Please sign in to comment.