Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-2179

Replace testutil/assert with testify/assert

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.12.0, 1.12.0-alpha1
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      The mongo-go-driver tests currently use a mixture of "go.mongodb.org/mongo-driver/internal/testutil/assert", "github.com/stretchr/testify/assert" to assert things in the tests. Those packages have a similar but slightly different API that is confusing to read/use together. The "github.com/stretchr/testify/assert" package is a more complete API and is a standard assertion API in Go projects, so prefer that package over the internal package.

      Questions:

      • Is "github.com/stretchr/testify/assert" the best package or is there another package that has superseded it?

      Definition of done:

      • Vendor a useful subset of the "github.com/stretchr/testify/assert" and "github.com/stretchr/testify/require" packages somewhere in an internal package.
      • Replace all uses of the "go.mongodb.org/mongo-driver/internal/testutil/assert" package with the vendored "github.com/stretchr/testify/assert"/"github.com/stretchr/testify/require" APIs.
      • Remove the testutil/assert package.

            Assignee:
            benji.rewis@mongodb.com Benji Rewis (Inactive)
            Reporter:
            matt.dale@mongodb.com Matt Dale
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: