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
8e64c053
Commit
8e64c053
authored
Dec 10, 2019
by
yingqiumin@126.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve rpc test
parent
ab419ecf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
test-rpc.sh
plugin/dapp/js/cmd/test/test-rpc.sh
+4
-8
No files found.
plugin/dapp/js/cmd/test/test-rpc.sh
View file @
8e64c053
...
...
@@ -41,29 +41,25 @@ function init() {
function
configJSCreator
()
{
req
=
'{"method":"Chain33.CreateTransaction","params":[{"execer":"'
${
manager_name
}
'","actionName":"Modify","payload":{"key":"js-creator","op":"add","value":"'
${
beneficiary
}
'"}}]}'
resok
=
'(.error|not) and (.result != null)'
chain33_Http
"
$req
"
${
MAIN_HTTP
}
"
$resok
"
"
$FUNCNAME
"
".result"
chain33_Http
"
$req
"
${
MAIN_HTTP
}
'(.error|not) and (.result != null)'
"
$FUNCNAME
"
".result"
chain33_SignRawTx
"
$RETURN_RESP
"
"
${
super_manager
}
"
"
${
MAIN_HTTP
}
"
}
function
createJSContract
()
{
req
=
'{"method":"Chain33.CreateTransaction","params":[{"execer":"'
${
exec_name
}
'","actionName":"Create","payload":{"name":"'
${
game
}
'","code":"'
${
jsCode
}
'"}}]}'
resok
=
'(.error|not) and (.result != null)'
chain33_Http
"
$req
"
${
MAIN_HTTP
}
"
$resok
"
"
$FUNCNAME
"
".result"
chain33_Http
"
$req
"
${
MAIN_HTTP
}
'(.error|not) and (.result != null)'
"
$FUNCNAME
"
".result"
chain33_SignRawTx
"
$RETURN_RESP
"
"
${
beneficiary_key
}
"
"
${
MAIN_HTTP
}
"
}
function
callJS
()
{
req
=
'{"method":"Chain33.CreateTransaction","params":[{"execer":"'
${
user_game
}
'","actionName":"Call","payload":{"name":"'
${
game
}
'","funcname":"hello","args":"{}"}}]}'
resok
=
'(.error|not) and (.result != null)'
chain33_Http
"
$req
"
${
MAIN_HTTP
}
"
$resok
"
"
$FUNCNAME
"
".result"
chain33_Http
"
$req
"
${
MAIN_HTTP
}
'(.error|not) and (.result != null)'
"
$FUNCNAME
"
".result"
chain33_SignRawTx
"
$RETURN_RESP
"
"
${
beneficiary_key
}
"
"
${
MAIN_HTTP
}
"
}
function
queryJS
()
{
req
=
'{"method":"Chain33.Query","params":[{"execer":"'
${
user_game
}
'","funcName":"Query","payload":{"name":"'
${
game
}
'","funcname":"hello","args":"{}"}}]}'
resok
=
'(.error|not) and (.result != null)'
chain33_Http
"
$req
"
${
MAIN_HTTP
}
"
$resok
"
"
$FUNCNAME
"
chain33_Http
"
$req
"
${
MAIN_HTTP
}
'(.error|not) and (.result != null)'
"
$FUNCNAME
"
}
function
run_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