postgres migration and test script fix
This commit is contained in:
parent
4156abc708
commit
2699a676c4
|
@ -16,9 +16,9 @@ CREATE TABLE lite_rpc.Txs (
|
|||
CREATE TABLE lite_rpc.Blocks (
|
||||
slot BIGINT NOT NULL PRIMARY KEY,
|
||||
leader_id BIGINT NOT NULL,
|
||||
parent_slot BIGINT NOT NULL
|
||||
parent_slot BIGINT NOT NULL,
|
||||
cluster_time TIMESTAMP WITH TIME ZONE NOT NULL,
|
||||
local_time TIMESTAMP WITH TIME ZONE,
|
||||
local_time TIMESTAMP WITH TIME ZONE
|
||||
);
|
||||
|
||||
CREATE TABLE lite_rpc.AccountAddrs (
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
# kill background jobs on exit/failure
|
||||
trap 'kill $(jobs -pr)' SIGINT SIGTERM EXIT
|
||||
|
||||
# env variables
|
||||
export PGPASSWORD="password"
|
||||
export PG_CONFIG="host=localhost dbname=postgres user=postgres password=password sslmode=disable"
|
||||
|
@ -16,6 +19,12 @@ docker start test-postgres
|
|||
echo "Clearing database"
|
||||
pg_run -f ../migrations/rm.sql
|
||||
pg_run -f ../migrations/create.sql
|
||||
|
||||
echo "Starting the test validator"
|
||||
solana-test-validator > /dev/null &
|
||||
|
||||
echo "Waiting 8 seconds for solana-test-validator to start"
|
||||
sleep 8
|
||||
|
||||
echo "Starting lite-rpc"
|
||||
cargo run --release -- -p &
|
||||
|
|
Loading…
Reference in New Issue