codeamp / circuit

CodeAmp API. Built with Golang, GraphQL, GORM and Socket-IO
Apache License 2.0
21 stars 6 forks source link

Mock database connections for database_test #476

Open drshrey opened 5 years ago

drshrey commented 5 years ago

Currently, you have to have a running instance of mysql and postgres in order to run database_test.go. We should mock these since the only thing we care about testing is the database plugin logic and not the dbs themselves. We also want the execution of these tests to be as self-contained as possible.