Skip to content

Commit

Permalink
Add cast support for docker and integration test (#1334)
Browse files Browse the repository at this point in the history
* Add cast support for docker and integration test

* Fix
  • Loading branch information
yzang2019 authored and udpatil committed Apr 19, 2024
1 parent 915788a commit dd1ea0f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 2 additions & 0 deletions docker/localnode/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ RUN rm -rf build/generated
RUN wget https://go.dev/dl/go1.21.4.linux-amd64.tar.gz
RUN tar -xvf go1.21.4.linux-amd64.tar.gz
RUN mv go /usr/local/
RUN curl -L https://foundry.paradigm.xyz | bash
RUN /root/.foundry/bin/foundryup
SHELL ["/bin/bash", "-c"]


Expand Down
4 changes: 2 additions & 2 deletions docker/localnode/scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export BUILD_PATH=/sei-protocol/sei-chain/build
export PATH=$GOBIN:$PATH:/usr/local/go/bin:$BUILD_PATH
echo "export GOPATH=$HOME/go" >> /root/.bashrc
echo "GOBIN=$GOPATH/bin" >> /root/.bashrc
echo "export PATH=$GOBIN:$PATH:/usr/local/go/bin:$BUILD_PATH" >> /root/.bashrc
echo "export PATH=$GOBIN:$PATH:/usr/local/go/bin:$BUILD_PATH:/root/.foundry/bin" >> /root/.bashrc
/bin/bash -c "source /root/.bashrc"
mkdir -p $GOBIN
# Step 0: Build on node 0
Expand Down Expand Up @@ -70,4 +70,4 @@ echo "All $CLUSTER_SIZE Nodes started successfully, starting oracle price feeder
/usr/bin/start_price_feeder.sh
echo "Oracle price feeder is started"

tail -f /dev/null
tail -f /dev/null
7 changes: 5 additions & 2 deletions integration_test/evm_module/hardhat_test.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
- name: Hardhat Test
inputs:
# Fund owner account in hardhat tests
- cmd: printf "12345678\n" | seid tx evm send 0xF87A299e6bC7bEba58dbBe5a5Aa21d49bCD16D52 10000000000000000000 --from admin
- cmd: printf "12345678\n" | seid tx evm send 0xF87A299e6bC7bEba58dbBe5a5Aa21d49bCD16D52 10000000000000000000 --from admin | cut -d':' -f2-
env: TX_HASH
- cmd: cast receipt "$TX_HASH" -j |jq -r ."status"
env: RESULT
verifiers:
- type: eval
expr: 1 == 1
expr: RESULT == "0x1"
2 changes: 1 addition & 1 deletion integration_test/scripts/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def run_bash_command(self, command, docker=False, container="", env_map=None, ve
if env_map:
for key in env_map:
envs += f'-e {key}=\'{env_map[key]}\' '
full_cmd = f'docker exec {envs} {container} /bin/bash -c \'export PATH=$PATH:/root/go/bin && {command}\''
full_cmd = f'docker exec {envs} {container} /bin/bash -c \'export PATH=$PATH:/root/go/bin:/root/.foundry/bin && {command}\''
else:
full_cmd = command
if verbose:
Expand Down

0 comments on commit dd1ea0f

Please sign in to comment.