mirror of https://github.com/VinGarcia/ksql.git
Update kmysql_test.go to use mariadb instead of mysql
This change was made because the mysql image was too instable which caused it to fail in several situations.pull/24/head
parent
1969ed1fc7
commit
73952d0e03
|
@ -9,8 +9,8 @@ jobs:
|
|||
- uses: actions/checkout@v2
|
||||
- name: Pull Postgres
|
||||
run: docker pull postgres:14.0
|
||||
- name: Pull MySQL
|
||||
run: docker pull mysql:8.0.27
|
||||
- name: Pull MariaDB
|
||||
run: docker pull mariadb:10.8
|
||||
- name: Pull SQLServer
|
||||
run: docker pull mcr.microsoft.com/mssql/server:2017-latest
|
||||
- name: Check go version
|
||||
|
|
|
@ -36,11 +36,11 @@ func startMySQLDB(dbName string) (databaseURL string, closer func()) {
|
|||
// pulls an image, creates a container based on it and runs it
|
||||
resource, err := pool.RunWithOptions(
|
||||
&dockertest.RunOptions{
|
||||
Repository: "mysql",
|
||||
Tag: "8.0.27",
|
||||
Repository: "mariadb",
|
||||
Tag: "10.8",
|
||||
Env: []string{
|
||||
"MYSQL_ROOT_PASSWORD=mysql",
|
||||
"MYSQL_DATABASE=" + dbName,
|
||||
"MARIADB_ROOT_PASSWORD=mysql",
|
||||
"MARIADB_DATABASE=" + dbName,
|
||||
},
|
||||
},
|
||||
func(config *docker.HostConfig) {
|
||||
|
@ -56,7 +56,7 @@ func startMySQLDB(dbName string) (databaseURL string, closer func()) {
|
|||
hostAndPort := resource.GetHostPort("3306/tcp")
|
||||
databaseUrl := fmt.Sprintf("root:mysql@(%s)/%s?timeout=30s", hostAndPort, dbName)
|
||||
|
||||
fmt.Println("Connecting to mysql on url: ", databaseUrl)
|
||||
fmt.Println("Connecting to mariadb on url: ", databaseUrl)
|
||||
|
||||
resource.Expire(40) // Tell docker to hard kill the container in 40 seconds
|
||||
|
||||
|
|
|
@ -21,8 +21,6 @@ export PATH=$PATH:$(pwd)/scripts
|
|||
( cd adapters/kpgx ; run-with-replace.sh go test -coverprofile=coverage.txt -covermode=atomic -coverpkg=github.com/vingarcia/ksql ./... )
|
||||
( cd adapters/ksqlite3 ; run-with-replace.sh go test -coverprofile=coverage.txt -covermode=atomic -coverpkg=github.com/vingarcia/ksql ./... )
|
||||
( cd adapters/ksqlserver ; run-with-replace.sh go test -coverprofile=coverage.txt -covermode=atomic -coverpkg=github.com/vingarcia/ksql ./... )
|
||||
|
||||
# Disabled this one because the mysql container fails to start too often on the CI:
|
||||
#( cd adapters/kmysql ; run-with-replace.sh go test -coverprofile=coverage.txt -covermode=atomic -coverpkg=github.com/vingarcia/ksql ./... )
|
||||
( cd adapters/kmysql ; run-with-replace.sh go test -coverprofile=coverage.txt -covermode=atomic -coverpkg=github.com/vingarcia/ksql ./... )
|
||||
|
||||
# codecov will find all `coverate.txt` files, so it will work fine.
|
||||
|
|
Loading…
Reference in New Issue