@@ -11,6 +11,7 @@ import (
11
11
"strings"
12
12
"testing"
13
13
14
+ "github.com/google/go-cmp/cmp"
14
15
tfjson "github.com/hashicorp/terraform-json"
15
16
"github.com/stretchr/testify/require"
16
17
protobuf "google.golang.org/protobuf/proto"
@@ -842,7 +843,9 @@ func TestConvertResources(t *testing.T) {
842
843
var resourcesMap []map [string ]interface {}
843
844
err = json .Unmarshal (data , & resourcesMap )
844
845
require .NoError (t , err )
845
- require .Equal (t , expectedNoMetadataMap , resourcesMap )
846
+ if diff := cmp .Diff (expectedNoMetadataMap , resourcesMap ); diff != "" {
847
+ require .Failf (t , "unexpected resources" , "diff (-want +got):\n %s" , diff )
848
+ }
846
849
847
850
expectedParams := expected .parameters
848
851
if expectedParams == nil {
@@ -897,7 +900,9 @@ func TestConvertResources(t *testing.T) {
897
900
var resourcesMap []map [string ]interface {}
898
901
err = json .Unmarshal (data , & resourcesMap )
899
902
require .NoError (t , err )
900
- require .Equal (t , expectedMap , resourcesMap )
903
+ if diff := cmp .Diff (expectedMap , resourcesMap ); diff != "" {
904
+ require .Failf (t , "unexpected resources" , "diff (-want +got):\n %s" , diff )
905
+ }
901
906
require .ElementsMatch (t , expected .externalAuthProviders , state .ExternalAuthProviders )
902
907
})
903
908
})
0 commit comments