From 7b63297bdb086702923869bf6c5ea1459edf8ed6 Mon Sep 17 00:00:00 2001 From: ryanchristo <12519942+ryanchristo@users.noreply.github.com> Date: Thu, 31 Aug 2023 16:13:50 -0700 Subject: [PATCH] add multiple voters to index votes test --- docker/tester.Dockerfile | 4 ++-- docker/tester/test_index_votes.sh | 13 +++---------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/docker/tester.Dockerfile b/docker/tester.Dockerfile index 4a1b314..4a336ef 100644 --- a/docker/tester.Dockerfile +++ b/docker/tester.Dockerfile @@ -25,8 +25,8 @@ RUN regen config chain-id $REGEN_CHAIN_ID RUN regen config keyring-backend test # Add accounts -RUN printf "trouble alarm laptop turn call stem lend brown play planet grocery survey smooth seed describe hood praise whale smile repeat dry sauce front future\n\n" | regen keys --keyring-backend test add validator -i -RUN printf "cool trust waste core unusual report duck amazing fault juice wish century across ghost cigar diary correct draw glimpse face crush rapid quit equip\n\n" | regen keys --keyring-backend test add user -i +RUN printf "cool trust waste core unusual report duck amazing fault juice wish century across ghost cigar diary correct draw glimpse face crush rapid quit equip\n\n" | regen keys --keyring-backend test add user1 -i +RUN printf "music debris chicken erode flag law demise over fall always put bounce ring school dumb ivory spin saddle ostrich better seminar heart beach kingdom\n\n" | regen keys --keyring-backend test add user2 -i # Copy tester start script COPY docker/scripts/tester_start.sh /home/tester/scripts/ diff --git a/docker/tester/test_index_votes.sh b/docker/tester/test_index_votes.sh index 3e5cea7..1b5e37c 100644 --- a/docker/tester/test_index_votes.sh +++ b/docker/tester/test_index_votes.sh @@ -74,22 +74,15 @@ proposal_id=$(regen q group proposals-by-group-policy "$policy_address" --output # vote "yes" on proposal with user 1 regen tx group vote "$proposal_id" "$address1" VOTE_OPTION_YES "" --from "$address1" $regen_tx_flags -# wait for transaction to be processed -sleep 10 - -# TODO: confirm vote NOT indexed in database -psql postgres://postgres:password@localhost:5432/postgres -c "SELECT * from votes;" -# TODO: if vote found, then exit 1 - # vote "yes" on proposal with user 2 regen tx group vote "$proposal_id" "$address1" VOTE_OPTION_YES "" --from "$address2" $regen_tx_flags -# wait for transaction to be processed and voting period to end +# wait for transactions to be processed sleep 10 -# TODO: confirm vote NOT indexed in database +# TODO: confirm votes NOT indexed in database psql postgres://postgres:password@localhost:5432/postgres -c "SELECT * from votes;" -# TODO: if vote found, then exit 1 +# TODO: if votes found, then exit 1 # execute proposal regen tx group exec "$proposal_id" --from "$address1" $regen_tx_flags