From b2d33c8255f6ec105bfcb462a50b94793cac9c37 Mon Sep 17 00:00:00 2001 From: Aswin Gopinathan <40236624+infiniteoverflow@users.noreply.github.com> Date: Sun, 4 Oct 2020 19:01:57 +0530 Subject: [PATCH] Replace reflect.DeepEqual() with "github.com/google/go-cmp/cmp" (#58) * Replace reflect.DeepEqual() with github.com/google/go-cmp/cmp * Added import to "github.com/google/go-cmp/cmp" and removed reflect --- pkg/migrate/cstor/cspc_generator_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/migrate/cstor/cspc_generator_test.go b/pkg/migrate/cstor/cspc_generator_test.go index cbd2f773..262c3683 100644 --- a/pkg/migrate/cstor/cspc_generator_test.go +++ b/pkg/migrate/cstor/cspc_generator_test.go @@ -17,9 +17,9 @@ limitations under the License. package migrate import ( - "reflect" "testing" - + + "github.com/google/go-cmp/cmp" cstor "github.com/openebs/api/pkg/apis/cstor/v1" apis "github.com/openebs/maya/pkg/apis/openebs.io/v1alpha1" ) @@ -184,7 +184,7 @@ func Test_getDataRaidGroups(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - if got := getDataRaidGroups(tt.args.cspObj); !reflect.DeepEqual(got, tt.want) { + if got := getDataRaidGroups(tt.args.cspObj); !cmp.Equal(got, tt.want) { t.Errorf("getDataRaidGroups() = %v, want %v", got, tt.want) } })