Commit 48fe048a authored by 郝东博's avatar 郝东博 Committed by vipwzw

fix make test error

parent f000476b
......@@ -277,7 +277,7 @@ func Test_EnablePrivacy(t *testing.T) {
req: &ty.ReqEnablePrivacy{Addrs: []string{testAddrs[0]}},
needReply: &ty.RepEnablePrivacy{
Results: []*ty.PriAddrResult{
{IsOK: true, Addr: testAddrs[0]}},
{ Addr: testAddrs[0],Msg:"ErrAddrNotExist"}},
},
},
}
......@@ -305,14 +305,15 @@ func Test_ShowPrivacyKey(t *testing.T) {
}{
{
req: &types.ReqString{Data: testAddrs[1]},
needError: ty.ErrPrivacyNotEnabled,
needError: types.ErrAddrNotExist,
},
{
req: &types.ReqString{Data: testAddrs[0]},
needReply: &ty.ReplyPrivacyPkPair{
/*needReply: &ty.ReplyPrivacyPkPair{
ShowSuccessful: true,
Pubkeypair: "92fe6cfec2e19cd15f203f83b5d440ddb63d0cb71559f96dc81208d819fea85886b08f6e874fca15108d244b40f9086d8c03260d4b954a40dfb3cbe41ebc7389",
},
},*/
needError:types.ErrAddrNotExist,
},
}
......@@ -349,6 +350,7 @@ func Test_CreateUTXOs(t *testing.T) {
Sender: testAddrs[0],
Pubkeypair: testPubkeyPairs[0],
},
needError:types.ErrAddrNotExist,
},
}
......@@ -379,6 +381,7 @@ func Test_SendPublic2PrivacyTransaction(t *testing.T) {
Pubkeypair: testPubkeyPairs[0],
},
needReply: &types.Reply{IsOk: true},
needError:types.ErrAddrNotExist,
},
}
......@@ -418,6 +421,7 @@ func Test_SendPrivacy2PrivacyTransaction(t *testing.T) {
Pubkeypair: testPubkeyPairs[1],
},
needReply: &types.Reply{IsOk: true},
needError:types.ErrAddrNotExist,
},
}
......@@ -457,6 +461,7 @@ func Test_SendPrivacy2PublicTransaction(t *testing.T) {
Receiver: testAddrs[0],
},
needReply: &types.Reply{IsOk: true},
needError:types.ErrAddrNotExist,
},
}
......@@ -496,6 +501,7 @@ func Test_CreateTransaction(t *testing.T) {
From: testAddrs[0],
Pubkeypair: testPubkeyPairs[0],
},
//needError:types.ErrAddrNotExist,
},
{ // 私对私测试
req: &types.ReqCreateTransaction{
......@@ -505,6 +511,7 @@ func Test_CreateTransaction(t *testing.T) {
From: testAddrs[0],
Pubkeypair: testPubkeyPairs[1],
},
needError:types.ErrAddrNotExist,
},
{ // 私对公测试
req: &types.ReqCreateTransaction{
......@@ -514,6 +521,7 @@ func Test_CreateTransaction(t *testing.T) {
From: testAddrs[0],
Pubkeypair: testPubkeyPairs[0],
},
needError:types.ErrAddrNotExist,
},
}
for index, testCase := range testCases {
......@@ -621,7 +629,7 @@ func Test_RescanUTXOs(t *testing.T) {
Addrs: testAddrs,
Flag: 0,
},
needError: ty.ErrPrivacyNotEnabled,
needError: types.ErrAccountNotExist,
},
{
enable: true,
......@@ -629,6 +637,7 @@ func Test_RescanUTXOs(t *testing.T) {
Addrs: testAddrs,
Flag: 0,
},
needError: types.ErrAccountNotExist,
},
}
for index, testCase := range testCases {
......
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