Skip to content

Commit

Permalink
Merge pull request #2257 from CounterpartyXCP/develop
Browse files Browse the repository at this point in the history
v10.4.1
  • Loading branch information
adamkrellenstein authored Sep 24, 2024
2 parents 827ae09 + 2e03561 commit 9fbb082
Show file tree
Hide file tree
Showing 57 changed files with 10,215 additions and 9,025 deletions.
50 changes: 27 additions & 23 deletions .github/workflows/test_compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
set -e
set -x

exit 0

export PATH="/snap/bin:$PATH"

if [ -f "./DOCKER_COMPOSE_TEST_LOCK" ]; then
echo "A test is already running or the last one failed. Exiting."
exit 1
Expand All @@ -23,7 +27,7 @@ sed -i 's/#- "--verbose"/- "-vv"/g' docker-compose.yml

# stop the running containers
docker compose --profile mainnet stop counterparty-core
docker compose --profile testnet stop counterparty-core-testnet
#docker compose --profile testnet stop counterparty-core-testnet

# remove counterparty-core container
#docker rm counterparty-core-counterparty-core-1
Expand All @@ -39,18 +43,18 @@ cat build.txt

# re-start containers
docker compose --profile mainnet up -d
docker compose --profile testnet up -d
#docker compose --profile testnet up -d

# wait for counterparty-core to be ready
while [ "$(docker compose logs counterparty-core 2>&1 | grep 'Watching for new blocks')" = "" ]; do
echo "Waiting for counterparty-core mainnet to be ready"
sleep 1
done

while [ "$(docker compose logs counterparty-core-testnet 2>&1 | grep 'Watching for new blocks')" = "" ]; do
echo "Waiting for counterparty-core testnet to be ready"
sleep 1
done
#while [ "$(docker compose logs counterparty-core-testnet 2>&1 | grep 'Watching for new blocks')" = "" ]; do
# echo "Waiting for counterparty-core testnet to be ready"
# sleep 1
#done


# check running info with API v1 mainnet
Expand All @@ -67,17 +71,17 @@ if [ "$response_v1_mainnet" -ne 200 ]; then
fi

# check running info with API v1 testnet
response_v1_testnet=$(curl -X POST http://127.0.0.1:14100/v1/ \
--user rpc:rpc \
-H 'Content-Type: application/json; charset=UTF-8'\
-H 'Accept: application/json, text/javascript' \
--data-binary '{ "jsonrpc": "2.0", "id": 0, "method": "get_running_info" }' \
--write-out '%{http_code}' --silent --output /dev/null)

if [ "$response_v1_testnet" -ne 200 ]; then
echo "Failed to get_running_info testnet"
exit 1
fi
#response_v1_testnet=$(curl -X POST http://127.0.0.1:14100/v1/ \
# --user rpc:rpc \
# -H 'Content-Type: application/json; charset=UTF-8'\
# -H 'Accept: application/json, text/javascript' \
# --data-binary '{ "jsonrpc": "2.0", "id": 0, "method": "get_running_info" }' \
# --write-out '%{http_code}' --silent --output /dev/null)

#if [ "$response_v1_testnet" -ne 200 ]; then
# echo "Failed to get_running_info testnet"
# exit 1
#fi

# check running info with API v2 mainnet
response_v2_mainnet=$(curl http://localhost:4000/v2/ \
Expand All @@ -89,13 +93,13 @@ if [ "$response_v2_mainnet" -ne 200 ]; then
fi

# check running info with API v2 testnet
response_v2_testnet=$(curl http://localhost:14000/v2/ \
--write-out '%{http_code}' --silent --output /dev/null)
#response_v2_testnet=$(curl http://localhost:14000/v2/ \
# --write-out '%{http_code}' --silent --output /dev/null)

if [ "$response_v2_mainnet" -ne 200 ]; then
echo "Failed to get API v2 root mainnet"
exit 1
fi
#if [ "$response_v2_testnet" -ne 200 ]; then
# echo "Failed to get API v2 root testnet"
# exit 1
#fi

# Let's reparse 50 blocks before Dredd and compare hashes tests
CURRENT_HEIGHT=$(curl http://localhost:4000/v2/ --silent | jq '.result.counterparty_height')
Expand Down
Loading

0 comments on commit 9fbb082

Please sign in to comment.