Replace testutil/assert with testify/assert

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Major - P3
    • 1.12.0, 1.12.0-alpha1
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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 (Inactive)
              Reporter:
              Matt Dale
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: