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
39ce184d
Commit
39ce184d
authored
Jun 03, 2019
by
pengjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix linter error
parent
16c1e821
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
11 deletions
+13
-11
dapp-test-common.sh
build/dapp-test-common.sh
+4
-2
test-rpc.sh
plugin/dapp/pokerbull/cmd/build/test-rpc.sh
+4
-4
test-rpc.sh
plugin/dapp/retrieve/cmd/build/test-rpc.sh
+5
-5
No files found.
build/dapp-test-common.sh
View file @
39ce184d
...
...
@@ -14,9 +14,11 @@ echo_rst() {
elif
[
"
$2
"
-eq
2
]
;
then
echo
-e
"
${
GRE
}
$1
not support
${
NOC
}
"
CASE_ERR
=
"err"
echo
$CASE_ERR
else
echo
-e
"
${
RED
}
$1
fail
${
NOC
}
"
CASE_ERR
=
"err"
echo
$CASE_ERR
fi
}
...
...
@@ -41,7 +43,7 @@ chain33_BlockWait() {
chain33_QueryTx
()
{
local
MAIN_HTTP
=
$2
chain33_BlockWait 1
$MAIN_HTTP
chain33_BlockWait 1
"
$MAIN_HTTP
"
local
txhash
=
"
$1
"
local
req
=
'"method":"Chain33.QueryTransaction","params":[{"hash":"'
"
$txhash
"
'"}]'
...
...
@@ -49,7 +51,7 @@ chain33_QueryTx() {
while
true
;
do
ret
=
$(
curl
-ksd
"{
$req
}"
"
${
MAIN_HTTP
}
"
| jq
-r
".result.tx.hash"
)
if
[
"
${
ret
}
"
!=
"
${
1
}
"
]
;
then
chain33_BlockWait 1
$MAIN_HTTP
chain33_BlockWait 1
"
$MAIN_HTTP
"
times
=
$((
times
-
1
))
if
[
$times
-le
0
]
;
then
echo
"====query tx=
$1
failed"
...
...
plugin/dapp/pokerbull/cmd/build/test-rpc.sh
View file @
39ce184d
...
...
@@ -37,7 +37,7 @@ pokerbull_QuitRawTx() {
chain33_SignRawTx
"
$tx
"
"56942AD84CCF4788ED6DACBC005A1D0C4F91B63BCF0C99A02BE03C8DEAE71138"
${
MAIN_HTTP
}
echo
"========== # pokerbull quit tx end =========="
chain33_BlockWait 1
${
MAIN_HTTP
}
chain33_BlockWait 1
"
${
MAIN_HTTP
}
"
}
pokerbull_ContinueRawTx
()
{
...
...
@@ -53,7 +53,7 @@ pokerbull_ContinueRawTx() {
chain33_SignRawTx
"
$tx
"
"2116459C0EC8ED01AA0EEAE35CAC5C96F94473F7816F114873291217303F6989"
${
MAIN_HTTP
}
echo
"========== # pokerbull continue tx end =========="
chain33_BlockWait 1
${
MAIN_HTTP
}
chain33_BlockWait 1
"
${
MAIN_HTTP
}
"
}
pokerbull_StartRawTx
()
{
...
...
@@ -70,7 +70,7 @@ pokerbull_StartRawTx() {
GAME_ID
=
$RAW_TX_HASH
echo
"========== # pokerbull start tx end =========="
chain33_BlockWait 1
${
MAIN_HTTP
}
chain33_BlockWait 1
"
${
MAIN_HTTP
}
"
}
pokerbull_QueryResult
()
{
...
...
@@ -106,7 +106,7 @@ init() {
from
=
"1EDnnePAZN48aC2hiTDzhkczfF39g1pZZX"
chain33_SendToAddress
"
$from
"
"
$pokerbull_addr
"
10000000000
${
MAIN_HTTP
}
chain33_BlockWait 1
${
MAIN_HTTP
}
chain33_BlockWait 1
"
${
MAIN_HTTP
}
"
}
function
run_test
()
{
...
...
plugin/dapp/retrieve/cmd/build/test-rpc.sh
View file @
39ce184d
...
...
@@ -23,7 +23,7 @@ retrieve_Backup() {
chain33_SignRawTx
"
$tx
"
"56942AD84CCF4788ED6DACBC005A1D0C4F91B63BCF0C99A02BE03C8DEAE71138"
${
MAIN_HTTP
}
echo
"========== # retrieve backup end =========="
chain33_BlockWait 1
${
MAIN_HTTP
}
chain33_BlockWait 1
"
${
MAIN_HTTP
}
"
}
retrieve_Prepare
()
{
...
...
@@ -42,7 +42,7 @@ retrieve_Prepare() {
chain33_SignRawTx
"
$tx
"
"2116459C0EC8ED01AA0EEAE35CAC5C96F94473F7816F114873291217303F6989"
${
MAIN_HTTP
}
echo
"========== # retrieve prepare end =========="
chain33_BlockWait 1
${
MAIN_HTTP
}
chain33_BlockWait 1
"
${
MAIN_HTTP
}
"
}
retrieve_Perform
()
{
...
...
@@ -61,7 +61,7 @@ retrieve_Perform() {
chain33_SignRawTx
"
$tx
"
"2116459C0EC8ED01AA0EEAE35CAC5C96F94473F7816F114873291217303F6989"
${
MAIN_HTTP
}
echo
"========== # retrieve perform end =========="
chain33_BlockWait 1
${
MAIN_HTTP
}
chain33_BlockWait 1
"
${
MAIN_HTTP
}
"
}
retrieve_Cancel
()
{
...
...
@@ -80,7 +80,7 @@ retrieve_Cancel() {
chain33_SignRawTx
"
$tx
"
"56942AD84CCF4788ED6DACBC005A1D0C4F91B63BCF0C99A02BE03C8DEAE71138"
${
MAIN_HTTP
}
echo
"========== # retrieve cancel end =========="
chain33_BlockWait 1
${
MAIN_HTTP
}
chain33_BlockWait 1
"
${
MAIN_HTTP
}
"
}
retrieve_QueryResult
()
{
...
...
@@ -111,7 +111,7 @@ init() {
from
=
"1EDnnePAZN48aC2hiTDzhkczfF39g1pZZX"
chain33_SendToAddress
"
$from
"
"
$retrieve_addr
"
1000000000
${
MAIN_HTTP
}
chain33_BlockWait 1
${
MAIN_HTTP
}
chain33_BlockWait 1
"
${
MAIN_HTTP
}
"
}
function
run_test
()
{
...
...
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