Commit f53537d2 authored by liuyuhang's avatar liuyuhang

modify some test

parent dbf7ffbe
......@@ -38,4 +38,4 @@ require (
gopkg.in/sourcemap.v1 v1.0.5 // indirect
)
replace github.com/33cn/chain33 => github.com/lyh169/chain33 v0.0.0-20191012060858-1e258d8cc3bf
replace github.com/33cn/chain33 => github.com/lyh169/chain33 v0.0.0-20191017080109-0e21124b01fc
......@@ -125,6 +125,8 @@ github.com/lyh169/chain33 v0.0.0-20191010100821-0fe85b69ee68 h1:ynWPfBxKR/nvifxC
github.com/lyh169/chain33 v0.0.0-20191010100821-0fe85b69ee68/go.mod h1:4I8n+Zyf3t0UKM5jjpqJY627Tub62oXkLsdzIv4r6rQ=
github.com/lyh169/chain33 v0.0.0-20191012060858-1e258d8cc3bf h1:TXOjG6jLLFCjSZoKPR6pDoxKJg9iOCu9AiJbe7XtXsA=
github.com/lyh169/chain33 v0.0.0-20191012060858-1e258d8cc3bf/go.mod h1:4I8n+Zyf3t0UKM5jjpqJY627Tub62oXkLsdzIv4r6rQ=
github.com/lyh169/chain33 v0.0.0-20191017080109-0e21124b01fc h1:X9d9RvQaECoqK1jWhSUzjcMa77Xxed1a50p9uWSYoQ4=
github.com/lyh169/chain33 v0.0.0-20191017080109-0e21124b01fc/go.mod h1:4I8n+Zyf3t0UKM5jjpqJY627Tub62oXkLsdzIv4r6rQ=
github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-isatty v0.0.4 h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs=
......
......@@ -18,7 +18,6 @@ import (
dbmock "github.com/33cn/chain33/common/db/mocks"
"github.com/33cn/chain33/types"
pt "github.com/33cn/plugin/plugin/dapp/paracross/types"
"strings"
"github.com/33cn/plugin/plugin/dapp/paracross/testnode"
"github.com/stretchr/testify/mock"
)
......@@ -173,7 +172,7 @@ func (suite *AssetTransferTestSuite) TestExecTransfer() {
}
func (suite *AssetTransferTestSuite) TestExecTransferInPara() {
chain33TestCfg = types.NewChain33Config(strings.Replace(testnode.DefaultConfig, "Title=\"user.p.guodun.\"", "Title=\"user.p.test.\"" , 1))
chain33TestCfg = types.NewChain33Config(testnode.DefaultConfig)
//para_init(Title)
toB := Nodes[1]
......@@ -282,7 +281,7 @@ func (suite *AssetTransferTestSuite) TestExecTransferToken() {
}
func (suite *AssetTransferTestSuite) TestExecTransferTokenInPara() {
chain33TestCfg = types.NewChain33Config(strings.Replace(testnode.DefaultConfig, "Title=\"user.p.guodun.\"", "Title=\"user.p.test.\"" , 1))
chain33TestCfg = types.NewChain33Config(testnode.DefaultConfig)
// para_init(Title)
toB := Nodes[1]
......
......@@ -55,7 +55,7 @@ var (
TokenSymbol = "X"
MainBlockHeightForTransfer = int64(9)
tempTitle = ""
chain33TestCfg = types.NewChain33Config(strings.Replace(testnode.DefaultConfig, "Title=\"user.p.guodun.\"", "Title=\"user.p.test.\"" , 1))
chain33TestCfg = types.NewChain33Config(testnode.DefaultConfig)
chain33TestMainCfg = types.NewChain33Config(strings.Replace(types.GetDefaultCfgstring(), "Title=\"local\"", "Title=\"test\"" , 1))
)
......
......@@ -2,7 +2,7 @@ package testnode
//DefaultConfig default config for testnode
var DefaultConfig = `
Title="user.p.guodun."
Title="user.p.test."
CoinSymbol="bty"
# TestNet=true
......
......@@ -3,7 +3,6 @@ package testnode
import (
"github.com/33cn/chain33/types"
"github.com/33cn/chain33/util/testnode"
"strings"
)
/*
......@@ -24,7 +23,7 @@ func NewParaNode(main *testnode.Chain33Mock, para *testnode.Chain33Mock) *ParaNo
main.Listen()
}
if para == nil {
cfg := types.NewChain33Config(strings.Replace(DefaultConfig, "Title=\"user.p.guodun.\"", "Title=\"user.p.test.\"" , 1))
cfg := types.NewChain33Config(DefaultConfig)
testnode.ModifyParaClient(cfg, main.GetCfg().RPC.GrpcBindAddr)
para = testnode.NewWithConfig(cfg, nil)
para.Listen()
......
......@@ -22,7 +22,6 @@ func Init(name string, cfg *types.Chain33Config, sub []byte) {
InitExecType()
}
// TODO 调整InitExecType的大小写
func InitExecType() {
ety := types.LoadExecutorType(driverName)
ety.InitFuncList(types.ListMethod(&ValNode{}))
......
......@@ -12,7 +12,6 @@ import (
_ "github.com/33cn/chain33/system"
_ "github.com/33cn/plugin/plugin"
"strings"
)
func TestClose(t *testing.T) {
......@@ -34,7 +33,7 @@ func TestParaNodeMempool(t *testing.T) {
main := testnode.New("", nil)
main.Listen()
chainCfg := types.NewChain33ConfigNoInit(strings.Replace(paratest.DefaultConfig, "Title=\"user.p.guodun.\"", "Title=\"user.p.test.\"" , 1))
chainCfg := types.NewChain33ConfigNoInit(paratest.DefaultConfig)
testnode.ModifyParaClient(chainCfg, main.GetCfg().RPC.GrpcBindAddr)
cfg := chainCfg.GetModuleConfig()
cfg.Mempool.Name = "para"
......
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