Skip to content

Commit

Permalink
chore: Replace go-cmp with testify
Browse files Browse the repository at this point in the history
  • Loading branch information
laynax committed Sep 22, 2023
1 parent 8768199 commit ba3145a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ require (
github.com/DataDog/datadog-go v4.8.2+incompatible
github.com/aws/aws-sdk-go v1.34.28
github.com/getsentry/sentry-go v0.12.0
github.com/google/go-cmp v0.5.7
github.com/google/uuid v1.3.0
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0
github.com/magefile/mage v1.13.0
Expand Down
8 changes: 3 additions & 5 deletions pkg/instrumentation/database_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"path"
"testing"

"github.com/google/go-cmp/cmp"
"github.com/stretchr/testify/assert"
"gopkg.in/DataDog/dd-trace-go.v1/ddtrace/mocktracer"
"gorm.io/driver/sqlite"
"gorm.io/gorm"
Expand Down Expand Up @@ -72,7 +72,7 @@ func TestInstrumentDatabase(t *testing.T) {
{
name: "DELETE",
tags: map[string]interface{}{
"db.count": int64(1),
"db.count": int64(2),
"db.err": nil,
"db.table": "test_records",
"service.name": "test_app_name-mysql",
Expand Down Expand Up @@ -130,9 +130,7 @@ func TestInstrumentDatabase(t *testing.T) {
t.Errorf("Got span: %s, expected: %s", actualName, expectedName)
}

if diff := cmp.Diff(expectedTags, actualTags); diff != "" {
t.Error(diff)
}
assert.Equal(t, expectedTags, actualTags, "database tags didn't match")
}
}

Expand Down

0 comments on commit ba3145a

Please sign in to comment.