Files
DECNET/tests/mysql_spinup.sh
anti 187194786f 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
2026-04-15 12:51:33 -04:00

21 lines
497 B
Bash
Executable File

# 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