JustAnotherOrganization / godb

Just a wrapper around database/sql for Golang to make object mapping less painful.
1 stars 0 forks source link

Add Test #3

Open GrimTheReaper opened 5 years ago

GrimTheReaper commented 5 years ago

I'm thinking we try to test this against the major SQL DBs, such as Oracle, MySQL, Postgress (probably not needed since they have a pretty snazzy client), MsSQL/TSQL/SQLServer, and whatever else that I am probably forgetting.

I would like to employ docker to do this, as it would make spinning up test environments and actually testing our functionally reasonable.

IngCr3at1on commented 5 years ago

Consider doing tests in 2 phases:

  1. package level logic tests for individual functions (DB interactions can be handled over https://github.com/DATA-DOG/go-sqlmock
  2. integration tests at the external level <pkg>_test using live databases in docker-compose.

This should allow you to keep a smooth developer experience with the unit tests while still having your full "real world" coverage at the integration level.