diff --git a/helper/resource/testing.go b/helper/resource/testing.go index 9453c34462..e4861a9089 100644 --- a/helper/resource/testing.go +++ b/helper/resource/testing.go @@ -328,6 +328,11 @@ type TestCase struct { // IDRefreshIgnore is a list of configuration keys that will be ignored. IDRefreshName string IDRefreshIgnore []string + + // DisableBinaryDriver forces this test case to run using the legacy test + // driver, even if the binary test driver has been enabled. + // This property will be removed in version 2.0.0 of the SDK. + DisableBinaryDriver bool } // TestStep is a single apply sequence of a test, done within the @@ -567,7 +572,7 @@ func Test(t TestT, c TestCase) { providers[name] = p } - if acctest.TestHelper != nil { + if acctest.TestHelper != nil && c.DisableBinaryDriver == false { // inject providers for ImportStateVerify RunLegacyTest(t.(*testing.T), c, providers) return