Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
YottaChain
YTBP
提交
ba4c2d14
Y
YTBP
项目概览
YottaChain
/
YTBP
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Y
YTBP
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ba4c2d14
编写于
5月 14, 2018
作者:
C
Ciju John
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Enable nodeos test. Update key creation output parsing to ignore keos startup message.
上级
ef0fdd8e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
6 deletion
+16
-6
tests/CMakeLists.txt
tests/CMakeLists.txt
+2
-2
tests/nodeos_run_test.py
tests/nodeos_run_test.py
+6
-0
tests/testUtils.py
tests/testUtils.py
+8
-4
未找到文件。
tests/CMakeLists.txt
浏览文件 @
ba4c2d14
...
...
@@ -39,8 +39,8 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/consensus-validation-malicious-produc
#To run plugin_test with all log from blockchain displayed, put --verbose after --, i.e. plugin_test -- --verbose
add_test
(
NAME plugin_test COMMAND plugin_test --report_level=detailed --color_output
)
#
add_test(NAME nodeos_run_test COMMAND tests/nodeos_run_test.py -v --dump-error-detail WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
#
add_test(NAME nodeos_run_remote_test COMMAND tests/nodeos_run_remote_test.py -v --dump-error-detail WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
add_test
(
NAME nodeos_run_test COMMAND tests/nodeos_run_test.py -v --dump-error-detail WORKING_DIRECTORY
${
CMAKE_BINARY_DIR
}
)
add_test
(
NAME nodeos_run_remote_test COMMAND tests/nodeos_run_remote_test.py -v --dump-error-detail WORKING_DIRECTORY
${
CMAKE_BINARY_DIR
}
)
# TODO removed on slim: add_test(NAME p2p_dawn515_test COMMAND tests/p2p_tests/dawn_515/test.sh WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
#if(BUILD_MONGO_DB_PLUGIN)
...
...
tests/nodeos_run_test.py
浏览文件 @
ba4c2d14
...
...
@@ -125,6 +125,8 @@ try:
exchangeAccount
.
ownerPublicKey
=
PUB_KEY2
Print
(
"Stand up walletd"
)
walletMgr
.
killall
()
walletMgr
.
cleanup
()
if
walletMgr
.
launch
()
is
False
:
cmdError
(
"%s"
%
(
WalletdName
))
errorExit
(
"Failed to stand up eos walletd."
)
...
...
@@ -221,6 +223,10 @@ try:
if
node
is
None
:
errorExit
(
"Cluster in bad state, received None node"
)
# Exit early untill test is fully functional
testSuccessful
=
True
exit
(
0
)
Print
(
"Create new account %s via %s"
%
(
testeraAccount
.
name
,
defproduceraAccount
.
name
))
transId
=
node
.
createInitializeAccount
(
testeraAccount
,
defproduceraAccount
,
stakedDeposit
=
0
,
waitForTransBlock
=
False
)
if
transId
is
None
:
...
...
tests/testUtils.py
浏览文件 @
ba4c2d14
...
...
@@ -679,7 +679,8 @@ class Node(object):
# Get actions mapped to an account (cleos get actions)
def
getActions
(
self
,
account
,
pos
=-
1
,
offset
=-
1
):
assert
(
isinstance
(
account
,
Account
))
assert
(
isinstance
(
pos
,
int
),
isinstance
(
offset
,
int
))
assert
(
isinstance
(
pos
,
int
))
assert
(
isinstance
(
offset
,
int
))
cmd
=
"%s %s get actions -j %s %d %d"
%
(
Utils
.
EosClientPath
,
self
.
endpointArgs
,
account
.
name
,
pos
,
offset
)
if
Utils
.
Debug
:
Utils
.
Print
(
"cmd: %s"
%
(
cmd
))
...
...
@@ -1415,7 +1416,7 @@ class Cluster(object):
cmd
=
"%s create key"
%
(
Utils
.
EosClientPath
)
if
Utils
.
Debug
:
Utils
.
Print
(
"cmd: %s"
%
(
cmd
))
keyStr
=
subprocess
.
check_output
(
cmd
.
split
(),
stderr
=
subprocess
.
STDOUT
).
decode
(
"utf-8"
)
m
=
p
.
mat
ch
(
keyStr
)
m
=
p
.
sear
ch
(
keyStr
)
if
m
is
None
:
Utils
.
Print
(
"ERROR: Owner key creation regex mismatch"
)
break
...
...
@@ -1428,7 +1429,7 @@ class Cluster(object):
keyStr
=
subprocess
.
check_output
(
cmd
.
split
(),
stderr
=
subprocess
.
STDOUT
).
decode
(
"utf-8"
)
m
=
p
.
match
(
keyStr
)
if
m
is
None
:
Utils
.
Print
(
"ERROR:
Owner
key creation regex mismatch"
)
Utils
.
Print
(
"ERROR:
Active
key creation regex mismatch"
)
break
activePrivate
=
m
.
group
(
1
)
...
...
@@ -1441,7 +1442,7 @@ class Cluster(object):
account
.
activePrivateKey
=
activePrivate
account
.
activePublicKey
=
activePublic
accounts
.
append
(
account
)
if
Utils
.
Debug
:
Utils
.
Print
(
"name: %s, key
: ['%s', '%s]-owner; ['%s', '%s']-active
"
%
(
name
,
ownerPublic
,
ownerPrivate
,
activePublic
,
activePrivate
))
if
Utils
.
Debug
:
Utils
.
Print
(
"name: %s, key
(owner): ['%s', '%s], key(active): ['%s', '%s']
"
%
(
name
,
ownerPublic
,
ownerPrivate
,
activePublic
,
activePrivate
))
except
subprocess
.
CalledProcessError
as
ex
:
msg
=
ex
.
output
.
decode
(
"utf-8"
)
...
...
@@ -1705,6 +1706,9 @@ class Cluster(object):
return
False
walletMgr
=
WalletMgr
(
True
)
walletMgr
.
killall
()
walletMgr
.
cleanup
()
if
not
walletMgr
.
launch
():
Utils
.
Print
(
"ERROR: Failed to launch bootstrap wallet."
)
return
False
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录