From 975d537b7e7678f15e0944d00cbc9b72c4eb4ef3 Mon Sep 17 00:00:00 2001 From: Paddy Carver Date: Tue, 14 Jul 2020 13:49:39 -0700 Subject: [PATCH] Fix TestIDRefresh to not timeout. 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. --- helper/resource/testing_new.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helper/resource/testing_new.go b/helper/resource/testing_new.go index fe0bb388dc..3a5603536f 100644 --- a/helper/resource/testing_new.go +++ b/helper/resource/testing_new.go @@ -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]