Skip to content

Commit

Permalink
readd devnet.sh, and update endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
rianhughes committed Oct 9, 2023
1 parent f039b16 commit a1f6117
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .bin/devnet.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/sh

i=0
version=""
export ACCOUNT_ADDRESS=0x06bb9425718d801fd06f144abb82eced725f0e81db61d2f9f4c9a26ece46a829

while true; do
i=$((i + 1))
curl --fail localhost:5050/is_alive 2>/dev/null 2>&1
result=$?
if [ $result -eq 0 ]; then
sleep 5
curl --fail -H 'Content-Type: application/json' -XPOST http://localhost:5050/mint \
-d '{ "address": "'${ACCOUNT_ADDRESS}'", "amount": 1000000000000000}'
exit 0
fi
if [ $i -gt 10 ]; then
break
fi
echo "we will continue in a while, loop ${i}..."
i=$((i + 1))
sleep 3
done

echo "could not check devnet is_alive; fail!!!"
exit 1
2 changes: 1 addition & 1 deletion .github/workflows/test_account.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
run: cd account && go test -timeout 600s -v -env devnet .
env:
TESTNET_ACCOUNT_PRIVATE_KEY: ${{ secrets.TESTNET_ACCOUNT_PRIVATE_KEY }}
INTEGRATION_BASE: "http://0.0.0.0:5050"
INTEGRATION_BASE: "http://localhost:5050"

# Test Account on mock
- name: Test Account with mocks
Expand Down

0 comments on commit a1f6117

Please sign in to comment.