From aa74f8bf2820e29489b915e7ccfa2c4efecd374c Mon Sep 17 00:00:00 2001 From: Masanori Yoshida Date: Wed, 21 Aug 2024 02:49:02 +0900 Subject: [PATCH] fix test-service --- tests/cases/tm2tm/scripts/test-service | 12 ++++++------ tests/cases/tm2tm/scripts/test-tx | 6 ++---- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/tests/cases/tm2tm/scripts/test-service b/tests/cases/tm2tm/scripts/test-service index 8b8a08f8..5be6860d 100755 --- a/tests/cases/tm2tm/scripts/test-service +++ b/tests/cases/tm2tm/scripts/test-service @@ -50,8 +50,8 @@ RLY_PID=$! echo "xxxxxxx ${SECONDS} relay service [packets = 0, time = 0] -> skip xxxxxx" sleep 4 -# transfer a token -${RLY} tx transfer ibc01 ibc0 ibc1 100samoleans ${TM_ADDRESS1} +# send a message +docker exec tendermint-chain0 sh -c "simd --home /root/data/ibc0 tx --keyring-backend=test --from ${TM_ADDRESS0} --chain-id ibc0 mockapp send mockapp channel-0 'mock packet data' --yes" expectUnrelayedCount "unrelayed-packets" "src" 1 expectUnrelayedCount "unrelayed-acknowledgements" "dst" 0 @@ -60,7 +60,7 @@ sleep 13 echo "xxxxxxx ${SECONDS} relay service [packets = 1, time = 20] -> skip xxxxxx" sleep 4 -${RLY} tx transfer ibc01 ibc0 ibc1 100samoleans ${TM_ADDRESS1} +docker exec tendermint-chain0 sh -c "simd --home /root/data/ibc0 tx --keyring-backend=test --from ${TM_ADDRESS0} --chain-id ibc0 mockapp send mockapp channel-0 'mock packet data' --yes" expectUnrelayedCount "unrelayed-packets" "src" 2 expectUnrelayedCount "unrelayed-acknowledgements" "dst" 0 @@ -72,9 +72,9 @@ sleep 4 expectUnrelayedCount "unrelayed-packets" "src" 0 expectUnrelayedCount "unrelayed-acknowledgements" "dst" 2 -${RLY} tx transfer ibc01 ibc0 ibc1 100samoleans ${TM_ADDRESS1} -${RLY} tx transfer ibc01 ibc0 ibc1 100samoleans ${TM_ADDRESS1} -${RLY} tx transfer ibc01 ibc0 ibc1 100samoleans ${TM_ADDRESS1} +docker exec tendermint-chain0 sh -c "simd --home /root/data/ibc0 tx --keyring-backend=test --from ${TM_ADDRESS0} --chain-id ibc0 mockapp send mockapp channel-0 'mock packet data' --yes" +docker exec tendermint-chain0 sh -c "simd --home /root/data/ibc0 tx --keyring-backend=test --from ${TM_ADDRESS0} --chain-id ibc0 mockapp send mockapp channel-0 'mock packet data' --yes" +docker exec tendermint-chain0 sh -c "simd --home /root/data/ibc0 tx --keyring-backend=test --from ${TM_ADDRESS0} --chain-id ibc0 mockapp send mockapp channel-0 'mock packet data' --yes" expectUnrelayedCount "unrelayed-packets" "src" 3 expectUnrelayedCount "unrelayed-acknowledgements" "dst" 2 diff --git a/tests/cases/tm2tm/scripts/test-tx b/tests/cases/tm2tm/scripts/test-tx index c3b55f69..62005305 100755 --- a/tests/cases/tm2tm/scripts/test-tx +++ b/tests/cases/tm2tm/scripts/test-tx @@ -14,8 +14,7 @@ TM_ADDRESS1=$(${RLY} tendermint keys show ibc1 testkey) echo "!!! ibc0 -> ibc1 !!!" -docker exec tendermint-chain0 sh -c \ - "simd --home /root/data/ibc0 tx --keyring-backend=test --from ${TM_ADDRESS0} --chain-id ibc0 mockapp send mockapp channel-0 'mock packet data' --yes" +docker exec tendermint-chain0 sh -c "simd --home /root/data/ibc0 tx --keyring-backend=test --from ${TM_ADDRESS0} --chain-id ibc0 mockapp send mockapp channel-0 'mock packet data' --yes" sleep ${TX_INTERNAL} ${RLY} tx relay --do-refresh ibc01 --src-seqs 1 sleep ${TX_INTERNAL} @@ -23,8 +22,7 @@ ${RLY} tx acks --do-refresh ibc01 --dst-seqs 1 echo "!!! ibc1 -> ibc0 !!!" -docker exec tendermint-chain1 sh -c \ - "simd --home /root/data/ibc1 tx --keyring-backend=test --from ${TM_ADDRESS1} --chain-id ibc1 mockapp send mockapp channel-0 'mock packet data' --yes" +docker exec tendermint-chain1 sh -c "simd --home /root/data/ibc1 tx --keyring-backend=test --from ${TM_ADDRESS1} --chain-id ibc1 mockapp send mockapp channel-0 'mock packet data' --yes" sleep ${TX_INTERNAL} ${RLY} tx relay --do-refresh ibc01 --dst-seqs 1 sleep ${TX_INTERNAL}