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
87d3a21b
Commit
87d3a21b
authored
Nov 27, 2018
by
vipwzw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto ci
parent
48fe048a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
privacybizpolicy_test.go
plugin/dapp/privacy/wallet/privacybizpolicy_test.go
+9
-9
No files found.
plugin/dapp/privacy/wallet/privacybizpolicy_test.go
View file @
87d3a21b
...
@@ -128,7 +128,7 @@ func (mock *testDataMock) importPrivateKey(PrivKey *types.ReqWalletImportPrivkey
...
@@ -128,7 +128,7 @@ func (mock *testDataMock) importPrivateKey(PrivKey *types.ReqWalletImportPrivkey
//校验label是否已经被使用
//校验label是否已经被使用
Account
,
err
:=
wallet
.
GetAccountByLabel
(
PrivKey
.
GetLabel
())
Account
,
err
:=
wallet
.
GetAccountByLabel
(
PrivKey
.
GetLabel
())
if
Account
!=
nil
||
err
!=
nil
{
if
Account
!=
nil
||
err
!=
nil
{
return
return
}
}
...
@@ -277,7 +277,7 @@ func Test_EnablePrivacy(t *testing.T) {
...
@@ -277,7 +277,7 @@ func Test_EnablePrivacy(t *testing.T) {
req
:
&
ty
.
ReqEnablePrivacy
{
Addrs
:
[]
string
{
testAddrs
[
0
]}},
req
:
&
ty
.
ReqEnablePrivacy
{
Addrs
:
[]
string
{
testAddrs
[
0
]}},
needReply
:
&
ty
.
RepEnablePrivacy
{
needReply
:
&
ty
.
RepEnablePrivacy
{
Results
:
[]
*
ty
.
PriAddrResult
{
Results
:
[]
*
ty
.
PriAddrResult
{
{
Addr
:
testAddrs
[
0
],
Msg
:
"ErrAddrNotExist"
}},
{
Addr
:
testAddrs
[
0
],
Msg
:
"ErrAddrNotExist"
}},
},
},
},
},
}
}
...
@@ -313,7 +313,7 @@ func Test_ShowPrivacyKey(t *testing.T) {
...
@@ -313,7 +313,7 @@ func Test_ShowPrivacyKey(t *testing.T) {
ShowSuccessful: true,
ShowSuccessful: true,
Pubkeypair: "92fe6cfec2e19cd15f203f83b5d440ddb63d0cb71559f96dc81208d819fea85886b08f6e874fca15108d244b40f9086d8c03260d4b954a40dfb3cbe41ebc7389",
Pubkeypair: "92fe6cfec2e19cd15f203f83b5d440ddb63d0cb71559f96dc81208d819fea85886b08f6e874fca15108d244b40f9086d8c03260d4b954a40dfb3cbe41ebc7389",
},*/
},*/
needError
:
types
.
ErrAddrNotExist
,
needError
:
types
.
ErrAddrNotExist
,
},
},
}
}
...
@@ -350,7 +350,7 @@ func Test_CreateUTXOs(t *testing.T) {
...
@@ -350,7 +350,7 @@ func Test_CreateUTXOs(t *testing.T) {
Sender
:
testAddrs
[
0
],
Sender
:
testAddrs
[
0
],
Pubkeypair
:
testPubkeyPairs
[
0
],
Pubkeypair
:
testPubkeyPairs
[
0
],
},
},
needError
:
types
.
ErrAddrNotExist
,
needError
:
types
.
ErrAddrNotExist
,
},
},
}
}
...
@@ -381,7 +381,7 @@ func Test_SendPublic2PrivacyTransaction(t *testing.T) {
...
@@ -381,7 +381,7 @@ func Test_SendPublic2PrivacyTransaction(t *testing.T) {
Pubkeypair
:
testPubkeyPairs
[
0
],
Pubkeypair
:
testPubkeyPairs
[
0
],
},
},
needReply
:
&
types
.
Reply
{
IsOk
:
true
},
needReply
:
&
types
.
Reply
{
IsOk
:
true
},
needError
:
types
.
ErrAddrNotExist
,
needError
:
types
.
ErrAddrNotExist
,
},
},
}
}
...
@@ -421,7 +421,7 @@ func Test_SendPrivacy2PrivacyTransaction(t *testing.T) {
...
@@ -421,7 +421,7 @@ func Test_SendPrivacy2PrivacyTransaction(t *testing.T) {
Pubkeypair
:
testPubkeyPairs
[
1
],
Pubkeypair
:
testPubkeyPairs
[
1
],
},
},
needReply
:
&
types
.
Reply
{
IsOk
:
true
},
needReply
:
&
types
.
Reply
{
IsOk
:
true
},
needError
:
types
.
ErrAddrNotExist
,
needError
:
types
.
ErrAddrNotExist
,
},
},
}
}
...
@@ -461,7 +461,7 @@ func Test_SendPrivacy2PublicTransaction(t *testing.T) {
...
@@ -461,7 +461,7 @@ func Test_SendPrivacy2PublicTransaction(t *testing.T) {
Receiver
:
testAddrs
[
0
],
Receiver
:
testAddrs
[
0
],
},
},
needReply
:
&
types
.
Reply
{
IsOk
:
true
},
needReply
:
&
types
.
Reply
{
IsOk
:
true
},
needError
:
types
.
ErrAddrNotExist
,
needError
:
types
.
ErrAddrNotExist
,
},
},
}
}
...
@@ -511,7 +511,7 @@ func Test_CreateTransaction(t *testing.T) {
...
@@ -511,7 +511,7 @@ func Test_CreateTransaction(t *testing.T) {
From
:
testAddrs
[
0
],
From
:
testAddrs
[
0
],
Pubkeypair
:
testPubkeyPairs
[
1
],
Pubkeypair
:
testPubkeyPairs
[
1
],
},
},
needError
:
types
.
ErrAddrNotExist
,
needError
:
types
.
ErrAddrNotExist
,
},
},
{
// 私对公测试
{
// 私对公测试
req
:
&
types
.
ReqCreateTransaction
{
req
:
&
types
.
ReqCreateTransaction
{
...
@@ -521,7 +521,7 @@ func Test_CreateTransaction(t *testing.T) {
...
@@ -521,7 +521,7 @@ func Test_CreateTransaction(t *testing.T) {
From
:
testAddrs
[
0
],
From
:
testAddrs
[
0
],
Pubkeypair
:
testPubkeyPairs
[
0
],
Pubkeypair
:
testPubkeyPairs
[
0
],
},
},
needError
:
types
.
ErrAddrNotExist
,
needError
:
types
.
ErrAddrNotExist
,
},
},
}
}
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