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
ce907e03
Commit
ce907e03
authored
May 10, 2019
by
jiangpeng
Committed by
vipwzw
May 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix rpc ut
parent
066a7c3e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
rpc_channel_test.go
plugin/dapp/privacy/rpc/rpc_channel_test.go
+1
-1
rpc_test.go
plugin/dapp/privacy/rpc/rpc_test.go
+1
-1
privacybizpolicy_test.go
plugin/dapp/privacy/wallet/privacybizpolicy_test.go
+2
-2
No files found.
plugin/dapp/privacy/rpc/rpc_channel_test.go
View file @
ce907e03
...
@@ -69,7 +69,7 @@ func testShowPrivacyKey(t *testing.T, jrpc *jsonclient.JSONClient) error {
...
@@ -69,7 +69,7 @@ func testShowPrivacyKey(t *testing.T, jrpc *jsonclient.JSONClient) error {
params
:=
types
.
ReqString
{
params
:=
types
.
ReqString
{
Data
:
"1JSRSwp16NvXiTjYBYK9iUQ9wqp3sCxz2p"
,
Data
:
"1JSRSwp16NvXiTjYBYK9iUQ9wqp3sCxz2p"
,
}
}
err
:=
jrpc
.
Call
(
"privacy.ShowPrivacy
k
ey"
,
params
,
&
res
)
err
:=
jrpc
.
Call
(
"privacy.ShowPrivacy
K
ey"
,
params
,
&
res
)
return
err
return
err
}
}
...
...
plugin/dapp/privacy/rpc/rpc_test.go
View file @
ce907e03
...
@@ -32,7 +32,7 @@ func TestChain33_PrivacyTxList(t *testing.T) {
...
@@ -32,7 +32,7 @@ func TestChain33_PrivacyTxList(t *testing.T) {
actual
:=
&
pty
.
ReqPrivacyTransactionList
{}
actual
:=
&
pty
.
ReqPrivacyTransactionList
{}
api
.
On
(
"ExecWalletFunc"
,
"privacy"
,
"PrivacyTransactionList"
,
actual
)
.
Return
(
nil
,
errors
.
New
(
"error value"
))
api
.
On
(
"ExecWalletFunc"
,
"privacy"
,
"PrivacyTransactionList"
,
actual
)
.
Return
(
nil
,
errors
.
New
(
"error value"
))
var
testResult
interface
{}
var
testResult
interface
{}
err
:=
testChain33
.
PrivacyTxList
(
actual
,
&
testResult
)
err
:=
testChain33
.
GetPrivacyTxByAddr
(
actual
,
&
testResult
)
t
.
Log
(
err
)
t
.
Log
(
err
)
assert
.
Equal
(
t
,
nil
,
testResult
)
assert
.
Equal
(
t
,
nil
,
testResult
)
assert
.
NotNil
(
t
,
err
)
assert
.
NotNil
(
t
,
err
)
...
...
plugin/dapp/privacy/wallet/privacybizpolicy_test.go
View file @
ce907e03
...
@@ -462,7 +462,7 @@ func Test_ShowPrivacyAccountSpend(t *testing.T) {
...
@@ -462,7 +462,7 @@ func Test_ShowPrivacyAccountSpend(t *testing.T) {
Addr
:
testAddrs
[
0
],
Addr
:
testAddrs
[
0
],
Token
:
types
.
BTY
,
Token
:
types
.
BTY
,
},
},
needError
:
types
.
ErrNotFound
,
//
needError: types.ErrNotFound,
},
},
}
}
for
index
,
testCase
:=
range
testCases
{
for
index
,
testCase
:=
range
testCases
{
...
@@ -491,7 +491,7 @@ func Test_PrivacyTransactionList(t *testing.T) {
...
@@ -491,7 +491,7 @@ func Test_PrivacyTransactionList(t *testing.T) {
Count
:
10
,
Count
:
10
,
Address
:
testAddrs
[
0
],
Address
:
testAddrs
[
0
],
},
},
needError
:
types
.
ErrTxNotExist
,
//
needError: types.ErrTxNotExist,
},
},
}
}
for
index
,
testCase
:=
range
testCases
{
for
index
,
testCase
:=
range
testCases
{
...
...
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