test: add MySQL backend integration tests
- test_mysql_backend_live.py: live integration tests for MySQL connections - test_mysql_histogram_sql.py: dialect-specific histogram query tests - test_mysql_url_builder.py: MySQL connection string construction - mysql_spinup.sh: Docker spinup script for local MySQL testing
This commit is contained in:
20
tests/mysql_spinup.sh
Executable file
20
tests/mysql_spinup.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
# start the instance
|
||||
docker run -d --rm --name decnet-mysql \
|
||||
-e MYSQL_ROOT_PASSWORD=root \
|
||||
-e MYSQL_DATABASE=decnet \
|
||||
-e MYSQL_USER=decnet \
|
||||
-e MYSQL_PASSWORD=decnet \
|
||||
-p 3307:3306 mysql:8
|
||||
|
||||
until docker exec decnet-mysql mysqladmin ping -h127.0.0.1 -uroot -proot --silent; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
echo "MySQL up."
|
||||
|
||||
export DECNET_DB_TYPE=mysql
|
||||
export DECNET_DB_URL='mysql+aiomysql://decnet:decnet@127.0.0.1:3307/decnet'
|
||||
|
||||
source ../.venv/bin/activate
|
||||
|
||||
sudo ../.venv/bin/decnet api
|
||||
Reference in New Issue
Block a user