Skip to content

Commit

Permalink
Replace reflect.DeepEqual() with "github.com/google/go-cmp/cmp" (#58)
Browse files Browse the repository at this point in the history
* Replace reflect.DeepEqual() with github.com/google/go-cmp/cmp
* Added import to "github.com/google/go-cmp/cmp" and removed reflect
  • Loading branch information
infiniteoverflow authored Oct 4, 2020
1 parent 52d7173 commit b2d33c8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/migrate/cstor/cspc_generator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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)
}
})
Expand Down

0 comments on commit b2d33c8

Please sign in to comment.