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
7d497896
Commit
7d497896
authored
May 28, 2019
by
pengjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix rpc-test error
parent
37de0b37
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
8 deletions
+33
-8
test-rpc.sh
plugin/dapp/retrieve/cmd/build/test-rpc.sh
+33
-8
No files found.
plugin/dapp/retrieve/cmd/build/test-rpc.sh
View file @
7d497896
...
@@ -70,7 +70,7 @@ retrieve_Backup() {
...
@@ -70,7 +70,7 @@ retrieve_Backup() {
reqDecode
=
'"method":"Chain33.DecodeRawTransaction","params":[{"txHex":"'
"
$tx
"
'"}]'
reqDecode
=
'"method":"Chain33.DecodeRawTransaction","params":[{"txHex":"'
"
$tx
"
'"}]'
data
=
$(
curl
-ksd
"{
$reqDecode
}"
${
MAIN_HTTP
}
| jq
-r
".result.txs[0]"
)
data
=
$(
curl
-ksd
"{
$reqDecode
}"
${
MAIN_HTTP
}
| jq
-r
".result.txs[0]"
)
ok
=
$(
jq
'(.execer
== "retrieve
")'
<<<
"
$data
"
)
ok
=
$(
jq
'(.execer
!= "
")'
<<<
"
$data
"
)
[
"
$ok
"
==
true
]
[
"
$ok
"
==
true
]
echo_rst
"
$FUNCNAME
"
"
$?
"
echo_rst
"
$FUNCNAME
"
"
$?
"
...
@@ -89,7 +89,7 @@ retrieve_Prepare() {
...
@@ -89,7 +89,7 @@ retrieve_Prepare() {
reqDecode
=
'"method":"Chain33.DecodeRawTransaction","params":[{"txHex":"'
"
$tx
"
'"}]'
reqDecode
=
'"method":"Chain33.DecodeRawTransaction","params":[{"txHex":"'
"
$tx
"
'"}]'
data
=
$(
curl
-ksd
"{
$reqDecode
}"
${
MAIN_HTTP
}
| jq
-r
".result.txs[0]"
)
data
=
$(
curl
-ksd
"{
$reqDecode
}"
${
MAIN_HTTP
}
| jq
-r
".result.txs[0]"
)
ok
=
$(
jq
'(.execer
== "retrieve
")'
<<<
"
$data
"
)
ok
=
$(
jq
'(.execer
!= "
")'
<<<
"
$data
"
)
[
"
$ok
"
==
true
]
[
"
$ok
"
==
true
]
echo_rst
"
$FUNCNAME
"
"
$?
"
echo_rst
"
$FUNCNAME
"
"
$?
"
...
@@ -108,7 +108,7 @@ retrieve_Perform() {
...
@@ -108,7 +108,7 @@ retrieve_Perform() {
reqDecode
=
'"method":"Chain33.DecodeRawTransaction","params":[{"txHex":"'
"
$tx
"
'"}]'
reqDecode
=
'"method":"Chain33.DecodeRawTransaction","params":[{"txHex":"'
"
$tx
"
'"}]'
data
=
$(
curl
-ksd
"{
$reqDecode
}"
${
MAIN_HTTP
}
| jq
-r
".result.txs[0]"
)
data
=
$(
curl
-ksd
"{
$reqDecode
}"
${
MAIN_HTTP
}
| jq
-r
".result.txs[0]"
)
ok
=
$(
jq
'(.execer
== "retrieve
")'
<<<
"
$data
"
)
ok
=
$(
jq
'(.execer
!= "
")'
<<<
"
$data
"
)
[
"
$ok
"
==
true
]
[
"
$ok
"
==
true
]
echo_rst
"
$FUNCNAME
"
"
$?
"
echo_rst
"
$FUNCNAME
"
"
$?
"
...
@@ -127,7 +127,7 @@ retrieve_Cancel() {
...
@@ -127,7 +127,7 @@ retrieve_Cancel() {
reqDecode
=
'"method":"Chain33.DecodeRawTransaction","params":[{"txHex":"'
"
$tx
"
'"}]'
reqDecode
=
'"method":"Chain33.DecodeRawTransaction","params":[{"txHex":"'
"
$tx
"
'"}]'
data
=
$(
curl
-ksd
"{
$reqDecode
}"
${
MAIN_HTTP
}
| jq
-r
".result.txs[0]"
)
data
=
$(
curl
-ksd
"{
$reqDecode
}"
${
MAIN_HTTP
}
| jq
-r
".result.txs[0]"
)
ok
=
$(
jq
'(.execer
== "retrieve
")'
<<<
"
$data
"
)
ok
=
$(
jq
'(.execer
!= "
")'
<<<
"
$data
"
)
[
"
$ok
"
==
true
]
[
"
$ok
"
==
true
]
echo_rst
"
$FUNCNAME
"
"
$?
"
echo_rst
"
$FUNCNAME
"
"
$?
"
...
@@ -209,7 +209,24 @@ Chain33_SendToAddress() {
...
@@ -209,7 +209,24 @@ Chain33_SendToAddress() {
echo_rst
"
$FUNCNAME
"
"
$?
"
echo_rst
"
$FUNCNAME
"
"
$?
"
hash
=
$(
jq
'(.result.hash)'
<<<
"
$resp
"
)
hash
=
$(
jq
'(.result.hash)'
<<<
"
$resp
"
)
echo
"hash=
$hash
"
echo
"hash=
$hash
"
query_tx
"
$hash
"
}
init
()
{
ispara
=
$(
echo
'"'
"
${
MAIN_HTTP
}
"
'"'
| jq
'.|contains("8901")'
)
echo
"ipara=
$ispara
"
if
[
"
$ispara
"
==
true
]
;
then
retrieve_addr
=
$(
curl
-ksd
'{"method":"Chain33.ConvertExectoAddr","params":[{"execname":"user.p.para.retrieve"}]}'
${
MAIN_HTTP
}
| jq
-r
".result"
)
else
retrieve_addr
=
$(
curl
-ksd
'{"method":"Chain33.ConvertExectoAddr","params":[{"execname":"retrieve"}]}'
${
MAIN_HTTP
}
| jq
-r
".result"
)
fi
echo
"retrieveaddr=
$retrieve_addr
"
from
=
"14KEKbYtKKQm4wMthSK9J4La4nAiidGozt"
Chain33_SendToAddress
"
$from
"
"
$retrieve_addr
"
10000000000
from
=
"1E5saiXVb9mW8wcWUUZjsHJPZs5GmdzuSY"
Chain33_SendToAddress
"
$from
"
"
$retrieve_addr
"
10000000000
block_wait 1
}
}
function
run_test
()
{
function
run_test
()
{
...
@@ -219,11 +236,18 @@ function run_test() {
...
@@ -219,11 +236,18 @@ function run_test() {
retrieve_Prepare
retrieve_Prepare
retrieve_QueryResult 2
retrieve_QueryResult 2
#retrieve_Perform "1E5saiXVb9mW8wcWUUZjsHJPZs5GmdzuSY" "14KEKbYtKKQm4wMthSK9J4La4nAiidGozt"
#retrieve_QueryResult "1E5saiXVb9mW8wcWUUZjsHJPZs5GmdzuSY" "14KEKbYtKKQm4wMthSK9J4La4nAiidGozt" 3
retrieve_Cancel
retrieve_Cancel
retrieve_QueryResult 4
retrieve_QueryResult 4
retrieve_Backup
retrieve_QueryResult 1
retrieve_Prepare
retrieve_QueryResult 2
sleep
61
retrieve_Perform
retrieve_QueryResult 3
}
}
function
main
()
{
function
main
()
{
...
@@ -231,6 +255,7 @@ function main() {
...
@@ -231,6 +255,7 @@ function main() {
echo
"=========== # retrieve rpc test ============="
echo
"=========== # retrieve rpc test ============="
echo
"ip=
$MAIN_HTTP
"
echo
"ip=
$MAIN_HTTP
"
init
run_test
run_test
if
[
-n
"
$CASE_ERR
"
]
;
then
if
[
-n
"
$CASE_ERR
"
]
;
then
...
...
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