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
b1b2c9f7
Commit
b1b2c9f7
authored
Jan 15, 2020
by
liuyuhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add autonomy rpc test
parent
1a47e08d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
1 deletion
+22
-1
dapp-test-common.sh
build/dapp-test-common.sh
+8
-0
docker-compose.sh
build/docker-compose.sh
+14
-1
test-rpc.sh
plugin/dapp/autonomy/cmd/test/test-rpc.sh
+0
-0
No files found.
build/dapp-test-common.sh
View file @
b1b2c9f7
...
...
@@ -2,6 +2,7 @@
RAW_TX_HASH
=
""
LAST_BLOCK_HASH
=
""
LAST_BLOCK_HEIGHT
=
0
CASE_ERR
=
""
RETURN_RESP
=
""
...
...
@@ -191,6 +192,13 @@ chain33_LastBlockhash() {
echo
-e
"######
\\
n last blockhash is
$LAST_BLOCK_HASH
\\
n######"
}
chain33_LastBlockHeight
()
{
local
MAIN_HTTP
=
$1
result
=
$(
curl
-ksd
'{"method":"Chain33.GetLastHeader","params":[{}]}'
-H
'content-type:text/plain;'
"
${
MAIN_HTTP
}
"
| jq
-r
".result.height"
)
LAST_BLOCK_HEIGHT
=
$result
echo
-e
"######
\\
n last blockheight is
$LAST_BLOCK_HEIGHT
\\
n######"
}
chain33_applyCoins
()
{
echo
"chain33_getMainChainCoins"
if
[
"$#"
-lt
3
]
;
then
...
...
build/docker-compose.sh
View file @
b1b2c9f7
...
...
@@ -112,6 +112,9 @@ function base_init() {
#relay genesis
sed
-i
$sedfix
's/^genesis="12qyocayNF7.*/genesis="1G5Cjy8LuQex2fuYv3gzb7B8MxAnxLEqt3"/g'
chain33.toml
#autonomy
sed
-i
$sedfix
's/^useBalance=.*/useBalance=true/g'
chain33.toml
sed
-i
$sedfix
's/^total="16htvcBNS.*/total="1Q9sQwothzM1gKSzkVZ8Dt1tqKX1uzSagx"/g'
chain33.toml
}
function
start
()
{
...
...
@@ -425,6 +428,15 @@ function dapp_test_address() {
# block_wait "${1}" 1
tx_wait
"
${
1
}
"
"
${
hash
}
"
#autonomy allocation for rpc test 1Q9sQwothzM1gKSzkVZ8Dt1tqKX1uzSagx
result
=
$(${
1
}
account import_key
-k
1c3e6cac2f887e1ab9180e2d5772dc4ba01accb8d4df434faba097003eb35482
-l
autonomytest | jq
".label"
)
echo
"
${
result
}
"
if
[
-z
"
${
result
}
"
]
;
then
exit
1
fi
hash
=
$(${
1
}
send coins transfer
-a
6300
-n
transfer
-t
1Q9sQwothzM1gKSzkVZ8Dt1tqKX1uzSagx
-k
4257D8692EF7FE13C68B65D6A52F03933DB2FA5CE8FAF210B5B8B80C721CED01
)
echo
"
${
hash
}
"
}
function
base_config
()
{
...
...
@@ -480,4 +492,4 @@ function main() {
}
# run script
main
main
\ No newline at end of file
plugin/dapp/autonomy/cmd/test/test-rpc.sh
View file @
b1b2c9f7
This diff is collapsed.
Click to expand it.
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