Commit 3bb4d58b authored by mdj33's avatar mdj33 Committed by vipwzw

fix ut

parent c6e251dc
...@@ -70,6 +70,8 @@ function para_set_toml() { ...@@ -70,6 +70,8 @@ function para_set_toml() {
#autonomy #autonomy
sed -i $xsedfix 's/^useBalance=.*/useBalance=true/g' "${1}" sed -i $xsedfix 's/^useBalance=.*/useBalance=true/g' "${1}"
sed -i $xsedfix 's/^total="16htvcBNS.*/total="1EZrEKPPC36SLRoLQBwLDjzcheiLRZJg49"/g' "${1}" sed -i $xsedfix 's/^total="16htvcBNS.*/total="1EZrEKPPC36SLRoLQBwLDjzcheiLRZJg49"/g' "${1}"
sed -i $xsedfix 's/^ForkRootHash=.*/ForkRootHash=0/g' "${1}"
} }
function para_set_wallet() { function para_set_wallet() {
......
...@@ -19,6 +19,7 @@ import ( ...@@ -19,6 +19,7 @@ import (
"github.com/33cn/chain33/types" "github.com/33cn/chain33/types"
"github.com/33cn/plugin/plugin/dapp/paracross/testnode" "github.com/33cn/plugin/plugin/dapp/paracross/testnode"
pt "github.com/33cn/plugin/plugin/dapp/paracross/types" pt "github.com/33cn/plugin/plugin/dapp/paracross/types"
"github.com/pkg/errors"
"github.com/stretchr/testify/mock" "github.com/stretchr/testify/mock"
) )
...@@ -114,7 +115,7 @@ func (suite *AssetTransferTestSuite) TestExecTransferNobalance() { ...@@ -114,7 +115,7 @@ func (suite *AssetTransferTestSuite) TestExecTransferNobalance() {
} }
_, err = suite.exec.Exec(tx, 1) _, err = suite.exec.Exec(tx, 1)
if err != types.ErrNoBalance { if errors.Cause(err) != types.ErrNoBalance {
suite.T().Error("Exec Transfer", err) suite.T().Error("Exec Transfer", err)
return return
} }
......
...@@ -18,6 +18,7 @@ import ( ...@@ -18,6 +18,7 @@ import (
dbmock "github.com/33cn/chain33/common/db/mocks" dbmock "github.com/33cn/chain33/common/db/mocks"
"github.com/33cn/chain33/types" "github.com/33cn/chain33/types"
pt "github.com/33cn/plugin/plugin/dapp/paracross/types" pt "github.com/33cn/plugin/plugin/dapp/paracross/types"
"github.com/pkg/errors"
"github.com/stretchr/testify/mock" "github.com/stretchr/testify/mock"
) )
...@@ -250,7 +251,7 @@ func (suite *AssetWithdrawTestSuite) TestExecWithdrawFailedOnPara() { ...@@ -250,7 +251,7 @@ func (suite *AssetWithdrawTestSuite) TestExecWithdrawFailedOnPara() {
} }
_, err = suite.exec.Exec(tx, 1) _, err = suite.exec.Exec(tx, 1)
if err != types.ErrNoBalance { if errors.Cause(err) != types.ErrNoBalance {
suite.T().Error("Exec Transfer", err) suite.T().Error("Exec Transfer", err)
return return
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment