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
3aa89eb0
Commit
3aa89eb0
authored
May 07, 2019
by
vipwzw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto ci
parent
deea0c8f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
21 deletions
+18
-21
docker-compose.sh
build/docker-compose.sh
+4
-4
system-test-rpc.sh
build/system-test-rpc.sh
+7
-9
test-rpc.sh
plugin/dapp/paracross/cmd/build/test-rpc.sh
+7
-8
No files found.
build/docker-compose.sh
View file @
3aa89eb0
...
@@ -57,7 +57,7 @@ if [ -n "${DAPP}" ]; then
...
@@ -57,7 +57,7 @@ if [ -n "${DAPP}" ]; then
fi
fi
if
[
-z
$DAPP
]
;
then
if
[
-z
$DAPP
]
;
then
source
system-test-rpc.sh
source
system-test-rpc.sh
fi
fi
...
@@ -327,8 +327,8 @@ function base_config() {
...
@@ -327,8 +327,8 @@ function base_config() {
# transfer "${CLI4}"
# transfer "${CLI4}"
}
}
function
base_test
(){
function
base_test
()
{
if
[
"
$DAPP
"
==
""
]
;
then
if
[
"
$DAPP
"
==
""
]
;
then
system_test_rpc
"
${
1
}
"
system_test_rpc
"
${
1
}
"
fi
fi
...
@@ -353,7 +353,7 @@ function main() {
...
@@ -353,7 +353,7 @@ function main() {
dapp_run config
dapp_run config
### test cases ###
### test cases ###
ip
=
$(${
CLI
}
net info
|
jq
-r
".externalAddr[0:10]"
)
ip
=
$(${
CLI
}
net info
|
jq
-r
".externalAddr[0:10]"
)
base_test
"
${
ip
}
"
base_test
"
${
ip
}
"
dapp_run
test
"
${
ip
}
"
dapp_run
test
"
${
ip
}
"
...
...
build/system-test-rpc.sh
View file @
3aa89eb0
...
@@ -2,31 +2,30 @@
...
@@ -2,31 +2,30 @@
MAIN_HTTP
=
""
MAIN_HTTP
=
""
# $2=0 means true, other false
# $2=0 means true, other false
echo_rst
(){
echo_rst
()
{
if
[
"
$2
"
-eq
0
]
;
then
if
[
"
$2
"
-eq
0
]
;
then
echo
"
$1
ok"
echo
"
$1
ok"
else
else
echo
"
$1
err"
echo
"
$1
err"
fi
fi
}
}
chain33_lock
(){
chain33_lock
()
{
ok
=
$(
curl
-s
--data-binary
'{"jsonrpc":"2.0","id":2,"method":"Chain33.Lock","params":[]}'
-H
'content-type:text/plain;'
${
MAIN_HTTP
}
|jq
-r
".result.isOK"
)
ok
=
$(
curl
-s
--data-binary
'{"jsonrpc":"2.0","id":2,"method":"Chain33.Lock","params":[]}'
-H
'content-type:text/plain;'
${
MAIN_HTTP
}
|
jq
-r
".result.isOK"
)
[
"
$ok
"
==
true
]
[
"
$ok
"
==
true
]
rst
=
$?
rst
=
$?
echo_rst
$FUNCNAME
$rst
echo_rst
$FUNCNAME
$rst
}
}
chain33_unlock
(){
chain33_unlock
()
{
ok
=
$(
curl
-s
--data-binary
'{"jsonrpc":"2.0","id":2,"method":"Chain33.UnLock","params":[{"passwd":"1314fuzamei","timeout":0}]}'
-H
'content-type:text/plain;'
${
MAIN_HTTP
}
|jq
-r
".result.isOK"
)
ok
=
$(
curl
-s
--data-binary
'{"jsonrpc":"2.0","id":2,"method":"Chain33.UnLock","params":[{"passwd":"1314fuzamei","timeout":0}]}'
-H
'content-type:text/plain;'
${
MAIN_HTTP
}
|
jq
-r
".result.isOK"
)
[
"
$ok
"
==
true
]
[
"
$ok
"
==
true
]
rst
=
$?
rst
=
$?
echo_rst
$FUNCNAME
$rst
echo_rst
$FUNCNAME
$rst
}
}
function
system_test_rpc
(){
function
system_test_rpc
()
{
local
ip
=
$1
local
ip
=
$1
MAIN_HTTP
=
"http://
$ip
:8801"
MAIN_HTTP
=
"http://
$ip
:8801"
echo
"=========== # system rpc test ============="
echo
"=========== # system rpc test ============="
...
@@ -36,4 +35,3 @@ function system_test_rpc(){
...
@@ -36,4 +35,3 @@ function system_test_rpc(){
}
}
#system_rpc_test
#system_rpc_test
plugin/dapp/paracross/cmd/build/test-rpc.sh
View file @
3aa89eb0
...
@@ -3,29 +3,29 @@
...
@@ -3,29 +3,29 @@
MAIN_HTTP
=
""
MAIN_HTTP
=
""
# $2=0 means true, other false
# $2=0 means true, other false
echo_rst
(){
echo_rst
()
{
if
[
"
$2
"
-eq
0
]
;
then
if
[
"
$2
"
-eq
0
]
;
then
echo
"
$1
ok"
echo
"
$1
ok"
else
else
echo
"
$1
err"
echo
"
$1
err"
fi
fi
}
}
chain33_lock
(){
chain33_lock
()
{
ok
=
$(
curl
-s
--data-binary
'{"jsonrpc":"2.0","id":2,"method":"Chain33.Lock","params":[]}'
-H
'content-type:text/plain;'
${
MAIN_HTTP
}
|jq
-r
".result.isOK"
)
ok
=
$(
curl
-s
--data-binary
'{"jsonrpc":"2.0","id":2,"method":"Chain33.Lock","params":[]}'
-H
'content-type:text/plain;'
${
MAIN_HTTP
}
|
jq
-r
".result.isOK"
)
[
"
$ok
"
==
true
]
[
"
$ok
"
==
true
]
rst
=
$?
rst
=
$?
echo_rst
$FUNCNAME
$rst
echo_rst
$FUNCNAME
$rst
}
}
chain33_unlock
(){
chain33_unlock
()
{
ok
=
$(
curl
-s
--data-binary
'{"jsonrpc":"2.0","id":2,"method":"Chain33.UnLock","params":[{"passwd":"1314fuzamei","timeout":0}]}'
-H
'content-type:text/plain;'
${
MAIN_HTTP
}
|jq
-r
".result.isOK"
)
ok
=
$(
curl
-s
--data-binary
'{"jsonrpc":"2.0","id":2,"method":"Chain33.UnLock","params":[{"passwd":"1314fuzamei","timeout":0}]}'
-H
'content-type:text/plain;'
${
MAIN_HTTP
}
|
jq
-r
".result.isOK"
)
[
"
$ok
"
==
true
]
[
"
$ok
"
==
true
]
rst
=
$?
rst
=
$?
echo_rst
$FUNCNAME
$rst
echo_rst
$FUNCNAME
$rst
}
}
function
dapp_rpc_test
(){
function
dapp_rpc_test
()
{
local
ip
=
$1
local
ip
=
$1
MAIN_HTTP
=
"http://
$ip
:8901"
MAIN_HTTP
=
"http://
$ip
:8901"
echo
"=========== # paracross rpc test ============="
echo
"=========== # paracross rpc test ============="
...
@@ -35,4 +35,3 @@ function dapp_rpc_test(){
...
@@ -35,4 +35,3 @@ function dapp_rpc_test(){
}
}
#system_rpc_test
#system_rpc_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