go-mysql-test-container
CategoryTesting
SubcategoryTesting Frameworks
Stars0
Golang MySQL testcontainer to help with MySQL integration testing
About go-mysql-test-container
go-mysql-test-container
Golang MySQL testcontainer that makes integration testing MySQL a breeze
Usage
Execute
go get github.com/arikama/go-mysql-test-container
Code
package main
import (
"testing"
"github.com/arikama/go-mysql-test-container/mysqltestcontainer"
)
func Test(t *testing.T) {
mySql, _ := mysqltestcontainer.Create("test")
db := mySql.GetDb()
err := db.Ping()
if err != nil {
log.L.Errorln(err.Error())
}
}
Development
-
Make sure Docker is installed on your local machine
docker --version -
Make sure you can run Docker locally
docker run hello-world -
Run the test
./gotest.sh
Frequently Asked Questions
What is go-mysql-test-container?
go-mysql-test-container is a Testing library for the Go programming language. Golang MySQL testcontainer to help with MySQL integration testing
How do I install go-mysql-test-container?
Install go-mysql-test-container with the Go module system using `go get arikama/go-mysql-test-container`. Check the repository for the current installation instructions.
What category does go-mysql-test-container belong to?
go-mysql-test-container is listed under Testing, specifically Testing Frameworks.