Skip to content

Commit

Permalink
fix ci attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
ra0x3 committed Oct 2, 2023
1 parent 17d7040 commit 8d711d0
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions packages/fuel-indexer-tests/scripts/test-examples.bash
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,24 @@ sleep 2

cd ../greetings-native

# Start the local Fuel node in the background (that we already previously built)
cargo run -p greetings-fuel-client --bin greetings-fuel-client &
sleep 2
# Fuel client has already been started...

# Start indexer in the background
forc-index run-native --path ./greetings-native-indexer -- --run-migrations --postgres-password my-secret &
sleep 5

# Ensure service is up and running via health check
db_status=$(curl http://localhost:29987/api/health | json_pp | jq '.database_status')
sleep 1
client_status=$(curl http://localhost:29987/api/health | json_pp | jq '.client_status')

if [[ "$db_status" == "$client_status" ]] && [[ "$db_status" == '"OK"' ]]; then
echo "Database and client are up and running."
else
echo "Database and/or client are not up and running."
exit 1
fi

# Trigger an indexable event
cargo run -p greetings-data --bin greetings-data
sleep 2
Expand Down

0 comments on commit 8d711d0

Please sign in to comment.