Skip to content

Commit

Permalink
Fix TestIDRefresh to not timeout.
Browse files Browse the repository at this point in the history
We had a call to `getState` outside the `runProviderCommand` helper
function, which timed out, as it couldn't connect to the provider it was
looking for.

Moving it inside the provider makes TestIDRefresh work again.
  • Loading branch information
paddycarver committed Jul 14, 2020
1 parent 39d496d commit 835810e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion helper/resource/testing_new.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ func testIDRefresh(c TestCase, t testing.T, wd *tftest.WorkingDir, step TestStep
// Refresh!
runProviderCommand(func() error {
wd.RequireRefresh(t)
state = getState(t, wd)
return nil
}, wd, defaultPluginServeOpts(wd, step.providers))
state = getState(t, wd)

// Verify attribute equivalence.
actualR := state.RootModule().Resources[c.IDRefreshName]
Expand Down

0 comments on commit 835810e

Please sign in to comment.