Skip to content

Commit

Permalink
remove postgres tests from justfile (#1120)
Browse files Browse the repository at this point in the history
  • Loading branch information
mayconamaroCW authored Jun 14, 2024
1 parent 74a9df7 commit 5ed279e
Showing 1 changed file with 0 additions and 63 deletions.
63 changes: 0 additions & 63 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -220,40 +220,6 @@ e2e-stratus-rocks block-mode="automine" test="":
killport 3000
exit $result_code

# E2E: Starts and execute Hardhat tests in Stratus
e2e-stratus-postgres block-mode="automine" test="":
#!/bin/bash
if [ -d e2e ]; then
cd e2e
fi

echo "-> Starting Postgres"
docker compose down
docker compose up -d || exit 1

echo "-> Waiting Postgres to start"
wait-service --tcp 0.0.0.0:5432 -t {{ wait_service_timeout }} -- echo

echo "-> Starting Stratus"
just build || exit 1
just run -a 0.0.0.0:3000 --block-mode {{block-mode}} --perm-storage {{ database_url }} > stratus.log &

echo "-> Waiting Stratus to start"
wait-service --tcp 0.0.0.0:3000 -t {{ wait_service_timeout }} -- echo

echo "-> Running E2E tests"
just e2e stratus {{block-mode}} {{test}}
result_code=$?

echo "-> Killing Stratus"
killport 3000

echo "-> Killing Postgres"
docker compose down

echo "** -> Stratus log accessible in ./stratus.log **"
exit $result_code

# E2E Clock: Builds and runs Stratus with block-time flag, then validates average block generation time
e2e-clock-stratus:
#!/bin/bash
Expand Down Expand Up @@ -472,35 +438,6 @@ contracts-test-stratus *args="":
killport 3000
exit $result_code

# Contracts: Start Stratus with Postgres and run contracts test
contracts-test-stratus-postgres *args="":
#!/bin/bash
echo "-> Starting Postgres"
docker compose down
docker compose up -d || exit 1

echo "-> Waiting Postgres to start"
wait-service --tcp 0.0.0.0:5432 -t {{ wait_service_timeout }} -- echo

echo "-> Starting Stratus"
just build || exit 1
just run -a 0.0.0.0:3000 --perm-storage {{ database_url }} > stratus.log &

echo "-> Waiting Stratus to start"
wait-service --tcp 0.0.0.0:3000 -t {{ wait_service_timeout }} -- echo

echo "-> Running E2E tests"
just e2e-contracts {{ args }}
result_code=$?

echo "-> Killing Stratus"
killport 3000

echo "-> Killing Postgres"
docker compose down

exit $result_code

contracts-test-stratus-rocks *args="":
#!/bin/bash
echo "-> Starting Stratus"
Expand Down

0 comments on commit 5ed279e

Please sign in to comment.