Skip to content

rubenv/mysqltest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mysqltest

Go library to spawn single-use MySQL / MariaDB servers for unit testing

Build Status GoDoc

Spawns a MySQL / MariaDB server with a single database configured. Ideal for unit tests where you want a clean instance each time. Then clean up afterwards.

Features:

  • Starts a clean isolated MySQL / MariaDB database
  • Tested on Fedora and Ubuntu

Usage

In your unit test:

mysql, err := mysqltest.Start()
defer mysql.Stop()

// Do something with mysql.DB (which is a *sql.DB)

License

This library is distributed under the MIT license.

About

MySQL / MariaDB test helper for Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages