jmoiron / sqlx

general purpose extensions to golang's database/sql
http://jmoiron.github.io/sqlx/
MIT License
16.3k stars 1.09k forks source link

[Proposal] Replace the Test Host Level DB's with containers. #919

Open bearrito opened 8 months ago

bearrito commented 8 months ago

It looks like the unit tests for this project require installing host level db instances. That's reasonable given the projects inception date.

However, I think there are better alternatives available.

Namely using https://github.com/testcontainers/testcontainers-go

Advantages

  1. Less overhead for development (If actually ongoing in this project)
  2. Easier to test within a vendors versions eg. we could have Postgres 12-16
  3. Easier to test across vendors e.g Mysql, Maria, Postgres, MSSQL etc.

If the maintainers accepted this I would contribute the suite.

stephen-up commented 1 month ago

As a user of this lib who was thinking about adding test coverage for clickhouse. This would be great.