@@ -15,9 +15,9 @@ import (
1515 "github.com/hashicorp/terraform-plugin-sdk/v2/diag"
1616 "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
1717
18- "github.com/hashicorp/terraform-plugin-testing/internal/plugintest"
1918 "github.com/hashicorp/terraform-plugin-testing/internal/testing/testprovider"
2019 "github.com/hashicorp/terraform-plugin-testing/internal/testing/testsdk/providerserver"
20+ "github.com/hashicorp/terraform-plugin-testing/internal/testingiface"
2121 "github.com/hashicorp/terraform-plugin-testing/tfversion"
2222)
2323
@@ -344,8 +344,8 @@ func TestTest_TestCase_ExternalProvidersAndProviderFactories_NonHashiCorpNamespa
344344func TestTest_TestCase_ExternalProviders_Error (t * testing.T ) {
345345 t .Parallel ()
346346
347- plugintest . TestExpectTFatal (t , func () {
348- Test (& mockT {} , TestCase {
347+ testingiface . ExpectFail (t , func (mockT * testingiface. MockT ) {
348+ Test (mockT , TestCase {
349349 TerraformVersionChecks : []tfversion.TerraformVersionCheck {
350350 tfversion .SkipBelow (tfversion .Version0_13_0 ), // ExternalProvider.Source
351351 },
@@ -366,7 +366,7 @@ func TestTest_TestCase_ExternalProviders_Error(t *testing.T) {
366366func TestTest_TestCase_ProtoV5ProviderFactories (t * testing.T ) {
367367 t .Parallel ()
368368
369- Test (& mockT {} , TestCase {
369+ Test (t , TestCase {
370370 ProtoV5ProviderFactories : map [string ]func () (tfprotov5.ProviderServer , error ){
371371 "test" : providerserver .NewProtov5ProviderServer (testprovider.Protov5Provider {}),
372372 },
@@ -381,8 +381,8 @@ func TestTest_TestCase_ProtoV5ProviderFactories(t *testing.T) {
381381func TestTest_TestCase_ProtoV5ProviderFactories_Error (t * testing.T ) {
382382 t .Parallel ()
383383
384- plugintest . TestExpectTFatal (t , func () {
385- Test (& mockT {} , TestCase {
384+ testingiface . ExpectFail (t , func (mockT * testingiface. MockT ) {
385+ Test (mockT , TestCase {
386386 ProtoV5ProviderFactories : map [string ]func () (tfprotov5.ProviderServer , error ){
387387 "test" : func () (tfprotov5.ProviderServer , error ) { //nolint:unparam // required signature
388388 return nil , fmt .Errorf ("test" )
@@ -400,7 +400,7 @@ func TestTest_TestCase_ProtoV5ProviderFactories_Error(t *testing.T) {
400400func TestTest_TestCase_ProtoV6ProviderFactories (t * testing.T ) {
401401 t .Parallel ()
402402
403- Test (& mockT {} , TestCase {
403+ Test (t , TestCase {
404404 ProtoV6ProviderFactories : map [string ]func () (tfprotov6.ProviderServer , error ){
405405 "test" : providerserver .NewProviderServer (testprovider.Provider {}),
406406 },
@@ -415,8 +415,8 @@ func TestTest_TestCase_ProtoV6ProviderFactories(t *testing.T) {
415415func TestTest_TestCase_ProtoV6ProviderFactories_Error (t * testing.T ) {
416416 t .Parallel ()
417417
418- plugintest . TestExpectTFatal (t , func () {
419- Test (& mockT {} , TestCase {
418+ testingiface . ExpectFail (t , func (mockT * testingiface. MockT ) {
419+ Test (mockT , TestCase {
420420 ProtoV6ProviderFactories : map [string ]func () (tfprotov6.ProviderServer , error ){
421421 "test" : func () (tfprotov6.ProviderServer , error ) { //nolint:unparam // required signature
422422 return nil , fmt .Errorf ("test" )
@@ -434,7 +434,7 @@ func TestTest_TestCase_ProtoV6ProviderFactories_Error(t *testing.T) {
434434func TestTest_TestCase_ProviderFactories (t * testing.T ) {
435435 t .Parallel ()
436436
437- Test (& mockT {} , TestCase {
437+ Test (t , TestCase {
438438 ProviderFactories : map [string ]func () (* schema.Provider , error ){
439439 "test" : func () (* schema.Provider , error ) { //nolint:unparam // required signature
440440 return & schema.Provider {}, nil
@@ -451,8 +451,8 @@ func TestTest_TestCase_ProviderFactories(t *testing.T) {
451451func TestTest_TestCase_ProviderFactories_Error (t * testing.T ) {
452452 t .Parallel ()
453453
454- plugintest . TestExpectTFatal (t , func () {
455- Test (& mockT {} , TestCase {
454+ testingiface . ExpectFail (t , func (mockT * testingiface. MockT ) {
455+ Test (mockT , TestCase {
456456 ProviderFactories : map [string ]func () (* schema.Provider , error ){
457457 "test" : func () (* schema.Provider , error ) { //nolint:unparam // required signature
458458 return nil , fmt .Errorf ("test" )
@@ -470,7 +470,7 @@ func TestTest_TestCase_ProviderFactories_Error(t *testing.T) {
470470func TestTest_TestCase_Providers (t * testing.T ) {
471471 t .Parallel ()
472472
473- Test (& mockT {} , TestCase {
473+ Test (t , TestCase {
474474 Providers : map [string ]* schema.Provider {
475475 "test" : {},
476476 },
0 commit comments