Skip to content

Commit

Permalink
fix testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
taokayan committed Dec 4, 2024
1 parent b0ca518 commit 2d33012
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -317,23 +317,20 @@ jobs:
- name: Test Leap Integration
run: |
mkdir -p test_run_root
mkdir test_run_root
cd test_run_root
${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}/tests/nodeos_eos_evm_test.py -v --eos-evm-contract-root ${{ steps.evm-contract.outputs.EVM_CONTRACT }} --eos-evm-build-root ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }} --use-miner ${{ steps.eos-evm-miner-build.outputs.EVM_MINER_ROOT }}
- name: Test Leap Integration - with Brownie Framework
run: |
mkdir -p test_run_root
mkdir test_run_root
cd test_run_root
pip install --upgrade web3
pip install otree
pip install websocket-client
pip install eth-brownie
npm install -g ganache
pip install flask
pip install flask-cors --upgrade
sudo npm install -g ganache
brownie networks add Ethereum localhost5000 host=http://127.0.0.1:5000 chainid=15555
${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}/tests/nodeos_eos_evm_brownietest.py -v --eos-evm-contract-root ${{ steps.evm-contract.outputs.EVM_CONTRACT }} --eos-evm-build-root ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }} --use-miner ${{ steps.eos-evm-miner-build.outputs.EVM_MINER_ROOT }}
pip install black
pip install click
${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}/tests/nodeos_eos_evm_brownietest.py -v --eos-evm-contract-root ${{ steps.evm-contract.outputs.EVM_CONTRACT }} --eos-evm-build-root ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }} --use-miner ${{ steps.eos-evm-miner-build.outputs.EVM_MINER_ROOT }} --flask-proxy-root ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}/tests/
- name: Test Leap Integration - different gas token
run: |
Expand Down
4 changes: 3 additions & 1 deletion tests/nodeos_eos_evm_brownietest.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def prefix_0x(hexstr):
appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="eos-evm-genesis.json")
appArgs.add(flag="--use-miner", type=str, help="EOS EVM miner to use to send trx to nodeos", default=None)
appArgs.add(flag="--miner-cmd", type=str, help="command line to start EVM miner", default="node dist/index.js")
appArgs.add(flag="--flask-proxy-root", type=str, help="command line to start EVM miner", default=".")

args=TestHelper.parse_args({"--keep-logs","--dump-error-details","-v","--leave-running"}, applicationSpecificArgs=appArgs)
debug=args.v
Expand All @@ -96,6 +97,7 @@ def prefix_0x(hexstr):
genesisJson=args.genesis_json
useMiner=args.use_miner
minerCmd=args.miner_cmd
flaskProxyRoot=args.flask_proxy_root

assert eosEvmContractRoot is not None, "--eos-evm-contract-root is required"
assert eosEvmBuildRoot is not None, "--eos-evm-build-root is required"
Expand Down Expand Up @@ -552,7 +554,7 @@ def validate_all_balances():
# time.sleep(2)

Utils.Print("start Flask server to separate read/write requests")
flaskProcessPopen=subprocess.Popen(["python3", os.getcwd() + "/flask_proxy.py"])
flaskProcessPopen=subprocess.Popen(["python3", flaskProxyRoot + "/flask_proxy.py"])
time.sleep(2.0)

Utils.Print("test brownie connection")
Expand Down

0 comments on commit 2d33012

Please sign in to comment.