File tree Expand file tree Collapse file tree 2 files changed +30
-7
lines changed Expand file tree Collapse file tree 2 files changed +30
-7
lines changed Original file line number Diff line number Diff line change @@ -15,28 +15,28 @@ jobs:
15
15
username : mydockerhub-user
16
16
password : $DOCKERHUB_PASSWORD
17
17
environment :
18
- POSTGRES_USER : sharding_user
19
- POSTGRES_DB : shard0
18
+ POSTGRES_USER : postgres
19
+ POSTGRES_DB : postgres
20
20
# Add steps to the job
21
21
# See: https://circleci.com/docs/2.0/configuration-reference/#steps
22
22
steps :
23
23
- checkout
24
24
- restore_cache :
25
- key : cargo-lock-3 -{{ checksum "Cargo.lock" }}
25
+ key : cargo-lock-2 -{{ checksum "Cargo.lock" }}
26
26
- run :
27
27
name : " Install dependencies"
28
28
command : " sudo apt-get update && sudo apt-get install -y postgresql-contrib-12 postgresql-client-12"
29
29
- run :
30
30
name : " Build"
31
- command : " cargo build --release "
31
+ command : " cargo build"
32
32
- run :
33
33
name : " Test"
34
34
command : " cargo test"
35
35
- run :
36
- name : " Launch in background "
37
- command : " ./target/release/pgcat & pgbench -i -h 127.0.0.1 -p 6432 & pgbench -h 127.0.0.1 -p 6432 --protocol extended -t 100 -c 2 "
36
+ name : " Test end-to-end "
37
+ command : " bash .circleci/run_tests.sh "
38
38
- save_cache :
39
- key : cargo-lock-3 -{{ checksum "Cargo.lock" }}
39
+ key : cargo-lock-2 -{{ checksum "Cargo.lock" }}
40
40
paths :
41
41
- target
42
42
- ~/.cargo
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -e
4
+
5
+ ./target/debug/pgcat &
6
+
7
+ sleep 1
8
+
9
+ psql -f tests/sharding/query_routing_setup.sql
10
+
11
+ # Setup PgBench
12
+ pgbench -i -h 127.0.0.1 -p 6432
13
+
14
+ # Run it
15
+ pgbench -h 127.0.0.1 -p 6432 -t 500 -c 2
16
+
17
+ psql -h 127.0.0.1 -p 6432 -f tests/sharding/query_routing_test_insert.sql
18
+
19
+ psql -h 127.0.0.1 -p 6432 -f tests/sharding/query_routing_test_select.sql
20
+
21
+ # psql -f tests/sharding/query_routing_test_validate.sql
22
+
23
+ psql -h 127.0.0.1 -p 6432 -f tests/sharding/query_routing_test_primary_replica.sql
You can’t perform that action at this time.
0 commit comments