Files
pgcat/.circleci/run_tests.sh

29 lines
704 B
Bash
Raw Normal View History

2022-02-10 11:08:57 -08:00
#!/bin/bash
set -e
2022-02-10 11:11:56 -08:00
set -o xtrace
2022-02-10 11:08:57 -08:00
./target/debug/pgcat &
sleep 1
2022-02-10 11:16:08 -08:00
psql -e -h 127.0.0.1 -p 5432 -U postgres -f tests/sharding/query_routing_setup.sql
2022-02-10 11:08:57 -08:00
# Setup PgBench
pgbench -i -h 127.0.0.1 -p 6432
# Run it
2022-02-11 22:24:27 -08:00
pgbench -h 127.0.0.1 -p 6432 -t 500 -c 2 --protocol simple
2022-02-10 11:08:57 -08:00
2022-02-11 22:24:27 -08:00
# Extended protocol
pgbench -h 127.0.0.1 -p 6432 -t 500 -c 2 --protocol extended
# Sharding insert
2022-02-10 11:16:08 -08:00
psql -e -h 127.0.0.1 -p 6432 -f tests/sharding/query_routing_test_insert.sql
2022-02-10 11:08:57 -08:00
2022-02-11 22:24:27 -08:00
# Sharding select
2022-02-10 11:20:33 -08:00
psql -e -h 127.0.0.1 -p 6432 -f tests/sharding/query_routing_test_select.sql > /dev/null
2022-02-10 11:08:57 -08:00
2022-02-11 22:24:27 -08:00
# Replica/primary selection & more sharding tests
psql -e -h 127.0.0.1 -p 6432 -f tests/sharding/query_routing_test_primary_replica.sql > /dev/null