@@ -10,12 +10,11 @@ import (
1010 "github.com/hashicorp/terraform-plugin-go/tfprotov6"
1111
1212 r "github.com/hashicorp/terraform-plugin-testing/helper/resource"
13- "github.com/hashicorp/terraform-plugin-testing/internal/plugintest"
1413 "github.com/hashicorp/terraform-plugin-testing/internal/testing/testprovider"
1514 "github.com/hashicorp/terraform-plugin-testing/internal/testing/testsdk/providerserver"
1615 "github.com/hashicorp/terraform-plugin-testing/tfversion"
1716
18- testinginterface "github.com/mitchellh/go-testing-interface "
17+ "github.com/hashicorp/terraform-plugin-testing/internal/testingiface "
1918)
2019
2120func Test_RequireBetween (t * testing.T ) { //nolint:paralleltest
@@ -60,8 +59,8 @@ func Test_RequireBetween_Error_BelowMin(t *testing.T) { //nolint:paralleltest
6059 t .Setenv ("TF_ACC_TERRAFORM_PATH" , "" )
6160 t .Setenv ("TF_ACC_TERRAFORM_VERSION" , "1.1.0" )
6261
63- plugintest . TestExpectTFatal (t , func () {
64- r .UnitTest (& testinginterface. RuntimeT {} , r.TestCase {
62+ testingiface . ExpectFail (t , func (mockT * testingiface. MockT ) {
63+ r .UnitTest (mockT , r.TestCase {
6564 ProtoV6ProviderFactories : map [string ]func () (tfprotov6.ProviderServer , error ){
6665 "test" : func () (tfprotov6.ProviderServer , error ) { //nolint:unparam // required signature
6766 return nil , nil
@@ -82,8 +81,8 @@ func Test_RequireBetween_Error_BelowMin(t *testing.T) { //nolint:paralleltest
8281func Test_RequireBetween_Error_EqToMax (t * testing.T ) { //nolint:paralleltest
8382 t .Setenv ("TF_ACC_TERRAFORM_VERSION" , "1.3.0" )
8483
85- plugintest . TestExpectTFatal (t , func () {
86- r .UnitTest (& testinginterface. RuntimeT {} , r.TestCase {
84+ testingiface . ExpectFail (t , func (mockT * testingiface. MockT ) {
85+ r .UnitTest (mockT , r.TestCase {
8786 ProtoV6ProviderFactories : map [string ]func () (tfprotov6.ProviderServer , error ){
8887 "test" : func () (tfprotov6.ProviderServer , error ) { //nolint:unparam // required signature
8988 return nil , nil
@@ -111,8 +110,8 @@ func Test_RequireBetween_Prerelease_MaxEqualCoreVersion(t *testing.T) { //nolint
111110 // core versions.
112111 //
113112 // Reference: https://github.com/hashicorp/terraform-plugin-testing/issues/303
114- plugintest . TestExpectTFatal (t , func () {
115- r .UnitTest (& testinginterface. RuntimeT {} , r.TestCase {
113+ testingiface . ExpectFail (t , func (mockT * testingiface. MockT ) {
114+ r .UnitTest (mockT , r.TestCase {
116115 ProtoV6ProviderFactories : map [string ]func () (tfprotov6.ProviderServer , error ){
117116 "test" : providerserver .NewProviderServer (testprovider.Provider {}),
118117 },
@@ -184,8 +183,8 @@ func Test_RequireBetween_Prerelease_MinHigherCoreVersion(t *testing.T) { //nolin
184183 // 1.8.0 core version. This intentionally verifies that the logic does not
185184 // ignore the core version of the prerelease version when compared against
186185 // the core version of the check.
187- plugintest . TestExpectTFatal (t , func () {
188- r .UnitTest (& testinginterface. RuntimeT {} , r.TestCase {
186+ testingiface . ExpectFail (t , func (mockT * testingiface. MockT ) {
187+ r .UnitTest (mockT , r.TestCase {
189188 ProtoV6ProviderFactories : map [string ]func () (tfprotov6.ProviderServer , error ){
190189 "test" : providerserver .NewProviderServer (testprovider.Provider {}),
191190 },
@@ -228,8 +227,8 @@ func Test_RequireBetween_Prerelease_MinHigherPrerelease(t *testing.T) { //nolint
228227
229228 // The 1.7.0-rc1 prerelease should always be considered to be
230229 // below the 1.7.0-rc2 prerelease.
231- plugintest . TestExpectTFatal (t , func () {
232- r .UnitTest (& testinginterface. RuntimeT {} , r.TestCase {
230+ testingiface . ExpectFail (t , func (mockT * testingiface. MockT ) {
231+ r .UnitTest (mockT , r.TestCase {
233232 ProtoV6ProviderFactories : map [string ]func () (tfprotov6.ProviderServer , error ){
234233 "test" : providerserver .NewProviderServer (testprovider.Provider {}),
235234 },
@@ -251,8 +250,8 @@ func Test_RequireBetween_Prerelease_MaxLowerCoreVersion(t *testing.T) { //nolint
251250
252251 // The 1.8.0-rc1 prerelease should always be considered to be
253252 // above the 1.7.0 core version.
254- plugintest . TestExpectTFatal (t , func () {
255- r .UnitTest (& testinginterface. RuntimeT {} , r.TestCase {
253+ testingiface . ExpectFail (t , func (mockT * testingiface. MockT ) {
254+ r .UnitTest (mockT , r.TestCase {
256255 ProtoV6ProviderFactories : map [string ]func () (tfprotov6.ProviderServer , error ){
257256 "test" : providerserver .NewProviderServer (testprovider.Provider {}),
258257 },
@@ -295,8 +294,8 @@ func Test_RequireBetween_Prerelease_MaxLowerPrerelease(t *testing.T) { //nolint:
295294
296295 // The 1.8.0-rc1 prerelease should always be considered to be
297296 // above the 1.8.0-beta1 prerelease.
298- plugintest . TestExpectTFatal (t , func () {
299- r .UnitTest (& testinginterface. RuntimeT {} , r.TestCase {
297+ testingiface . ExpectFail (t , func (mockT * testingiface. MockT ) {
298+ r .UnitTest (mockT , r.TestCase {
300299 ProtoV6ProviderFactories : map [string ]func () (tfprotov6.ProviderServer , error ){
301300 "test" : providerserver .NewProviderServer (testprovider.Provider {}),
302301 },
0 commit comments