Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
link33
plugin
Commits
dbf7ffbe
Commit
dbf7ffbe
authored
Oct 17, 2019
by
liuyuhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify paracross dapp test and relay test
parent
b6105c0a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
17 deletions
+5
-17
para_test.go
plugin/dapp/paracross/testnode/para_test.go
+3
-12
para_test.go
plugin/dapp/paracross/wallet/para_test.go
+2
-2
relay_test.go
plugin/dapp/relay/executor/relay_test.go
+0
-3
No files found.
plugin/dapp/paracross/testnode/para_test.go
View file @
dbf7ffbe
...
...
@@ -7,26 +7,17 @@ import (
_
"github.com/33cn/chain33/system"
_
"github.com/33cn/plugin/plugin"
"github.com/33cn/chain33/util/testnode"
"github.com/33cn/chain33/types"
"strings"
)
func
TestParaNode
(
t
*
testing
.
T
)
{
cfg
:=
types
.
NewChain33Config
(
strings
.
Replace
(
types
.
GetDefaultCfgstring
(),
"Title=
\"
local
\"
"
,
"Title=
\"
chain33
\"
"
,
1
))
cfg
.
GetModuleConfig
()
.
Consensus
.
Name
=
"ticket"
main
:=
testnode
.
NewWithConfig
(
cfg
,
nil
)
main
.
Listen
()
para
:=
NewParaNode
(
main
,
nil
)
para
:=
NewParaNode
(
nil
,
nil
)
paraCfg
:=
para
.
Para
.
GetAPI
()
.
GetConfig
()
defer
para
.
Close
()
//通过rpc 发生信息
tx
:=
util
.
CreateTxWithExecer
(
paraCfg
,
para
.
Para
.
GetGenesisKey
(),
"user.p.
guodun
.none"
)
tx
:=
util
.
CreateTxWithExecer
(
paraCfg
,
para
.
Para
.
GetGenesisKey
(),
"user.p.
test
.none"
)
para
.
Para
.
SendTxRPC
(
tx
)
para
.
Para
.
WaitHeight
(
1
)
tx
=
util
.
CreateTxWithExecer
(
paraCfg
,
para
.
Para
.
GetGenesisKey
(),
"user.p.
guodun
.none"
)
tx
=
util
.
CreateTxWithExecer
(
paraCfg
,
para
.
Para
.
GetGenesisKey
(),
"user.p.
test
.none"
)
para
.
Para
.
SendTxRPC
(
tx
)
para
.
Para
.
WaitHeight
(
2
)
}
plugin/dapp/paracross/wallet/para_test.go
View file @
dbf7ffbe
...
...
@@ -32,10 +32,10 @@ func TestParaQuery(t *testing.T) {
para
.
Para
.
GetAPI
()
.
WalletLock
()
//通过rpc 发生信息
tx
:=
util
.
CreateTxWithExecer
(
paraCfg
,
para
.
Para
.
GetGenesisKey
(),
"user.p.
guodun
.none"
)
tx
:=
util
.
CreateTxWithExecer
(
paraCfg
,
para
.
Para
.
GetGenesisKey
(),
"user.p.
test
.none"
)
para
.
Para
.
SendTxRPC
(
tx
)
para
.
Para
.
WaitHeight
(
1
)
tx
=
util
.
CreateTxWithExecer
(
paraCfg
,
para
.
Para
.
GetGenesisKey
(),
"user.p.
guodun
.none"
)
tx
=
util
.
CreateTxWithExecer
(
paraCfg
,
para
.
Para
.
GetGenesisKey
(),
"user.p.
test
.none"
)
para
.
Para
.
SendTxRPC
(
tx
)
para
.
Para
.
WaitHeight
(
2
)
...
...
plugin/dapp/relay/executor/relay_test.go
View file @
dbf7ffbe
...
...
@@ -11,7 +11,6 @@ import (
"github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/common/db/mocks"
"github.com/33cn/chain33/types"
"github.com/33cn/chain33/util/testnode"
ty
"github.com/33cn/plugin/plugin/dapp/relay/types"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/suite"
...
...
@@ -23,8 +22,6 @@ import (
var
chainTestCfg
=
types
.
NewChain33Config
(
types
.
GetDefaultCfgstring
())
func
init
()
{
//init some config param
testnode
.
New
(
""
,
nil
)
Init
(
ty
.
RelayX
,
chainTestCfg
,
nil
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment