This repository has been archived by the owner on May 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(test): redo integration flow
- Loading branch information
1 parent
a6c644d
commit 10c0c50
Showing
12 changed files
with
91 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
.PHONY: devnet/up devnet/down motionlarity/up motionlarity/down test | ||
|
||
./devnet/.up: | ||
echo "Run Boost Devnet from pre-built images" | ||
rm -rf ./devnet/data && docker compose -f ./devnet/docker-compose.yaml up -d | ||
echo "Await Lotus full node startup" | ||
docker compose -f ./devnet/docker-compose.yaml exec lotus lotus wait-api --timeout=20m | ||
echo "Await Lotus-miner full node startup" | ||
docker compose -f ./devnet/docker-compose.yaml exec lotus-miner lotus-miner wait-api --timeout=20m | ||
touch ./devnet/.up | ||
|
||
devnet/up: ./devnet/.up | ||
|
||
./devnet/.boostready: ./devnet/.up | ||
./boost-setup.sh | ||
touch ./devnet/.boostready | ||
|
||
./motionlarity/.env.local: ./devnet/.up | ||
echo "Set up Motion Wallet and API endpoints" | ||
cat ./motionlarity/.env > ./motionlarity/.env.local | ||
echo "" >> ./motionlarity/.env.local | ||
./integration-setup.sh ./motionlarity/.env.local | ||
|
||
motionlarity/setup: ./motionlarity/.env.local ./devnet/.boostready | ||
|
||
devnet/down: motionlarity/down | ||
docker compose -f ./devnet/docker-compose.yaml down && sleep 2 && rm -rf ./devnet/data | ||
rm ./devnet/.up || true | ||
|
||
./motionlarity/.up: ./motionlarity/.env.local ./devnet/.boostready | ||
echo "Run Motionlarity" | ||
docker compose -f ./motionlarity/docker-compose.yaml --env-file ./motionlarity/.env.local up -d | ||
./waitmotion.sh | ||
touch ./motionlarity/.up | ||
|
||
motionlarity/up: ./motionlarity/.up | ||
|
||
motionlarity/down: | ||
docker compose -f ./motionlarity/docker-compose.yaml down --rmi=all --volumes | ||
rm ./motionlarity/.up || true | ||
rm ./motionlarity/.env.local || true | ||
rm ./devnet/.boostready || true | ||
|
||
test: motionlarity/up | ||
echo "Run Motion integration tests" | ||
MOTION_INTEGRATION_TEST='true' go test . -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo "setup boost pricing" | ||
for i in {1..10} | ||
do | ||
curl -X POST -d '{"operationName":"AppStorageAskUpdateMutation","variables":{"update":{"Price":"0", "VerifiedPrice": 0}},"query":"mutation AppStorageAskUpdateMutation($update: StorageAskUpdate!) {\n storageAskUpdate(update: $update)\n}\n"}' http://localhost:8080/graphql/query && break || sleep 5 | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo "build config file and wallets for motion" | ||
# Setup Lotus API token | ||
export `docker compose -f ./devnet/docker-compose.yaml exec lotus lotus auth api-info --perm=admin` | ||
IFS=: read -r token path <<< "${FULLNODE_API_INFO}" | ||
# Setup Motion Wallet | ||
MOTION_WALLET_ADDR=`docker compose -f ./devnet/docker-compose.yaml exec lotus lotus wallet new` | ||
MOTION_WALLET_KEY=`docker compose -f ./devnet/docker-compose.yaml exec lotus lotus wallet export ${MOTION_WALLET_ADDR}` | ||
LOTUS_WALLET_DEFAULT_ADDR=`docker compose -f ./devnet/docker-compose.yaml exec lotus lotus wallet default` | ||
docker compose -f ./devnet/docker-compose.yaml exec lotus lotus send --from=${LOTUS_WALLET_DEFAULT_ADDR} ${MOTION_WALLET_ADDR} 10 | ||
echo "LOTUS_TOKEN=${token}" >> $1 | ||
echo "MOTION_WALLET_ADDR=${MOTION_WALLET_ADDR}" >> $1 | ||
echo "MOTION_WALLET_KEY=${MOTION_WALLET_KEY}" >> $1 | ||
echo "MOTION_STORAGE_PROVIDERS=t01000" >> $1 | ||
echo "MOTION_API_ENDPOINT=http://localhost:40080" >> $1 | ||
echo "SINGULARITY_API_ENDPOINT=http://localhost:9091" >> $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
SINGULARITY_TAG=main | ||
LOTUS_TEST='true' | ||
LOTUS_API=http://lotus:1234/rpc/v1 | ||
MOTION_PRICE_PER_GIB_EPOCH=0.000000000000002 | ||
MOTION_PRICE_PER_GIB_EPOCH=0 | ||
MOTION_SINGULARITY_MAX_CAR_SIZE=7MiB | ||
MOTION_SINGULARITY_PACK_THRESHOLD=4096 | ||
MOTION_SINGULARITY_SCHEDULE_CRON='* * * * *' | ||
MOTION_VERIFIED_DEAL=true | ||
MOTION_VERIFIED_DEAL=false | ||
MOTION_SINGULARITY_SCHEDULE_DEAL_NUMBER=25 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo "Wait until motion is running" | ||
for i in {1..10} | ||
do | ||
docker compose -f ./devnet/docker-compose.yaml ps --services --filter "status=running" | grep motion && break || sleep 5 | ||
done |
This file was deleted.
Oops, something went wrong.