From 918258988df87205e38f6e9c3ad58103fb20fcc5 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Tue, 28 Nov 2017 10:24:50 -0600 Subject: [PATCH] Add loading ot exchange contract to test. #798 --- tests/eosd_run_test.sh | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/tests/eosd_run_test.sh b/tests/eosd_run_test.sh index b25ad4f74..e0ae8ae5d 100755 --- a/tests/eosd_run_test.sh +++ b/tests/eosd_run_test.sh @@ -70,7 +70,7 @@ killAll() cleanup() { - rm -rf tn_data_0 + rm -rf tn_data_00 rm -rf test_wallet_0 } @@ -275,9 +275,14 @@ fi # create another new account via initb ACCOUNT_INFO="$(programs/eosc/eosc --host $SERVER --port $PORT --wallet-port 8899 create account initb currency $PUB_KEY2 $PUB_KEY3)" -verifyErrorCode "eosc create account" +verifyErrorCode "eosc create account currency" + +# create another new account via inita +ACCOUNT_INFO="$(programs/eosc/eosc --host $SERVER --port $PORT --wallet-port 8899 create account inita exchange $PUB_KEY2 $PUB_KEY3)" +verifyErrorCode "eosc create account exchange" waitForNextBlock + ## now transfer from testera to currency using keys from testera # lock via lock_all @@ -379,7 +384,7 @@ fi # upload a contract INFO="$(programs/eosc/eosc --host $SERVER --port $PORT --wallet-port 8899 set contract currency contracts/currency/currency.wast contracts/currency/currency.abi)" -verifyErrorCode "eosc set contract testera" +verifyErrorCode "eosc set contract currency" count=`echo $INFO | grep -c "processed"` if [ $count == 0 ]; then error "FAILURE - set contract failed: $INFO" @@ -440,6 +445,20 @@ if [ $count == 0 ]; then error "FAILURE - get table currency account failed: $ACCOUNT_INFO" fi +# +# Exchange Contract Tests +# + +# upload exchange contract +INFO="$(programs/eosc/eosc --host $SERVER --port $PORT --wallet-port 8899 set contract exchange contracts/exchange/exchange.wast contracts/exchange/exchange.abi)" +verifyErrorCode "eosc set contract exchange" +count=`echo $INFO | grep -c "processed"` +if [ $count == 0 ]; then + error "FAILURE - set contract exchange failed: $INFO" +fi +getTransactionId "$INFO" + + # # Producer # -- GitLab