Context
The Go Driver copies functions from https://pkg.go.dev/github.com/stretchr/testify and puts them into internal/assert and internal/require for use in tests. Presumably, the purpose of this is to avoid taking a dependnecy on stretchr/testify. From the PR #1137:
This allows us to remove a number of dependencies and have a more consistent API for future testing.
However, from the Go Documentation:
[An indirect dependency] is a package transitively imported by a package or test in the main module, but whose path does not appear in any import declaration in the main module; or a module that appears in the module graph but does not provide any package directly imported by the main module.
That is, dependencies that are used exclusively in tests are marked with the // indirect comment in the go.mod file, which indicates that these dependencies are not required for the module's consumers but are needed for testing or development purposes. Since stretchr/testify would be an indirect dependency unrelated to direct dependnecies, we can rely on the fact that it will be pruned from the final module graph for users of the Go Driver.
Definition of done
Remove internal/assert and internal/require in favor of github.com/stretchr/testify.
Pitfalls
NA
- related to
-
GODRIVER-2179 Replace testutil/assert with testify/assert
-
- Closed
-