Skip to content

Commit

Permalink
fix(tests): fix tests rebasing
Browse files Browse the repository at this point in the history
  • Loading branch information
saiintbrisson committed Feb 2, 2023
1 parent 3c591a9 commit 0b94f50
Show file tree
Hide file tree
Showing 7 changed files with 180 additions and 326 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ name = "sqlite-derives"
path = "tests/sqlite/derives.rs"
required-features = ["sqlite", "macros"]

[[test]]
name = "sqlite-error"
path = "tests/sqlite/error.rs"
required-features = ["sqlite"]
Expand Down
352 changes: 162 additions & 190 deletions tests/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,159 +1,159 @@
version: "3"

services:
#
# MySQL 8.x, 5.7.x
# https://www.mysql.com/support/supportedplatforms/database.html
#

mysql_8:
# FIXME: 8.0.28 introduced a regression in our type tests: https://github.com/launchbadge/sqlx/issues/1664
# The MySQL devs agreed that it was a regression and that it will be fixed in 8.0.29
image: mysql:8.0.27
volumes:
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
ports:
- 3306
environment:
MYSQL_ROOT_HOST: '%'
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: sqlx

mysql_5_7:
image: mysql:5.7
volumes:
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
ports:
- 3306
environment:
MYSQL_ROOT_HOST: '%'
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: sqlx
#
# MariaDB 10.6, 10.5, 10.4, 10.3
# https://mariadb.org/about/#maintenance-policy
#

mariadb_10_6:
image: mariadb:10.6
volumes:
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
ports:
- 3306
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: sqlx

mariadb_10_5:
image: mariadb:10.5
volumes:
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
ports:
- 3306
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: sqlx

mariadb_10_4:
image: mariadb:10.4
volumes:
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
ports:
- 3306
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: sqlx

mariadb_10_3:
image: mariadb:10.3
volumes:
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
ports:
- 3306
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: sqlx

#
# PostgreSQL 14.x, 13.x, 12.x, 11.x 10.x
# https://www.postgresql.org/support/versioning/
#

postgres_14:
build:
context: .
dockerfile: postgres/Dockerfile
args:
VERSION: 14
ports:
- 5432
environment:
POSTGRES_DB: sqlx
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_HOST_AUTH_METHOD: scram-sha-256
POSTGRES_INITDB_ARGS: --auth-host=scram-sha-256
volumes:
- "./postgres/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
command: >
-c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key
postgres_13:
build:
context: .
dockerfile: postgres/Dockerfile
args:
VERSION: 13
ports:
- 5432
environment:
POSTGRES_DB: sqlx
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_HOST_AUTH_METHOD: scram-sha-256
POSTGRES_INITDB_ARGS: --auth-host=scram-sha-256
volumes:
- "./postgres/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
command: >
-c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key
postgres_12:
build:
context: .
dockerfile: postgres/Dockerfile
args:
VERSION: 12
ports:
- 5432
environment:
POSTGRES_DB: sqlx
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_HOST_AUTH_METHOD: scram-sha-256
POSTGRES_INITDB_ARGS: --auth-host=scram-sha-256
volumes:
- "./postgres/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
command: >
-c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key
postgres_11:
build:
context: .
dockerfile: postgres/Dockerfile
args:
VERSION: 11
ports:
- 5432
environment:
POSTGRES_DB: sqlx
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_HOST_AUTH_METHOD: scram-sha-256
POSTGRES_INITDB_ARGS: --auth-host=scram-sha-256
volumes:
- "./postgres/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
command: >
-c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key
#
# MySQL 8.x, 5.7.x
# https://www.mysql.com/support/supportedplatforms/database.html
#

mysql_8:
# FIXME: 8.0.28 introduced a regression in our type tests: https://github.com/launchbadge/sqlx/issues/1664
# The MySQL devs agreed that it was a regression and that it will be fixed in 8.0.29
image: mysql:8.0.27
volumes:
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
ports:
- "3306"
environment:
MYSQL_ROOT_HOST: "%"
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: sqlx

mysql_5_7:
image: mysql:5.7
volumes:
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
ports:
- "3306"
environment:
MYSQL_ROOT_HOST: "%"
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: sqlx
#
# MariaDB 10.6, 10.5, 10.4, 10.3
# https://mariadb.org/about/#maintenance-policy
#

mariadb_10_6:
image: mariadb:10.6
volumes:
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
ports:
- "3306"
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: sqlx

mariadb_10_5:
image: mariadb:10.5
volumes:
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
ports:
- "3306"
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: sqlx

mariadb_10_4:
image: mariadb:10.4
volumes:
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
ports:
- "3306"
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: sqlx

mariadb_10_3:
image: mariadb:10.3
volumes:
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
ports:
- "3306"
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: sqlx

#
# PostgreSQL 14.x, 13.x, 12.x, 11.x 10.x
# https://www.postgresql.org/support/versioning/
#

postgres_14:
build:
context: .
dockerfile: postgres/Dockerfile
args:
VERSION: 14
ports:
- "5432"
environment:
POSTGRES_DB: sqlx
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_HOST_AUTH_METHOD: scram-sha-256
POSTGRES_INITDB_ARGS: --auth-host=scram-sha-256
volumes:
- "./postgres/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
command: >
-c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key
postgres_13:
build:
context: .
dockerfile: postgres/Dockerfile
args:
VERSION: 13
ports:
- "5432"
environment:
POSTGRES_DB: sqlx
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_HOST_AUTH_METHOD: scram-sha-256
POSTGRES_INITDB_ARGS: --auth-host=scram-sha-256
volumes:
- "./postgres/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
command: >
-c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key
postgres_12:
build:
context: .
dockerfile: postgres/Dockerfile
args:
VERSION: 12
ports:
- "5432"
environment:
POSTGRES_DB: sqlx
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_HOST_AUTH_METHOD: scram-sha-256
POSTGRES_INITDB_ARGS: --auth-host=scram-sha-256
volumes:
- "./postgres/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
command: >
-c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key
postgres_11:
build:
context: .
dockerfile: postgres/Dockerfile
args:
VERSION: 11
ports:
- "5432"
environment:
POSTGRES_DB: sqlx
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_HOST_AUTH_METHOD: scram-sha-256
POSTGRES_INITDB_ARGS: --auth-host=scram-sha-256
volumes:
- "./postgres/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
command: >
-c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key
postgres_10:
build:
Expand All @@ -162,7 +162,7 @@ services:
args:
VERSION: 10
ports:
- 5432
- "5432"
environment:
POSTGRES_DB: sqlx
POSTGRES_USER: postgres
Expand All @@ -173,44 +173,16 @@ services:
- "./postgres/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
command: >
-c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key
#
# Microsoft SQL Server (MSSQL)
# https://hub.docker.com/_/microsoft-mssql-server
#

mssql_2019:
build:
context: .
dockerfile: mssql/Dockerfile
args:
VERSION: 2019-latest
ports:
- 1433
environment:
ACCEPT_EULA: "Y"
SA_PASSWORD: Password123!

mssql_2017:
build:
context: .
dockerfile: mssql/mssql-2017.dockerfile
args:
VERSION: 2017-latest
ports:
- 1433
environment:
ACCEPT_EULA: "Y"
SA_PASSWORD: Password123!

#
# IBM Db2
# https://hub.docker.com/r/ibmcom/db2
#

db2_11:
image: ibmcom/db2:11.5.1.0-CN1
privileged: true
environment:
LICENSE: accept
DB2INST1_PASSWORD: password
DBNAME: sqlx
db2_11:
image: ibmcom/db2:11.5.1.0-CN1
privileged: true
environment:
LICENSE: accept
DB2INST1_PASSWORD: password
DBNAME: sqlx
Loading

0 comments on commit 0b94f50

Please sign in to comment.