Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
YottaChain
YTBP
提交
6e1de5e6
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,发现更多精彩内容 >>
提交
6e1de5e6
编写于
1月 11, 2018
作者:
C
Ciju John
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Variablize executable paths. Convert more methods to use json library.
上级
c875cb65
变更
3
展开全部
隐藏空白更改
内联
并排
Showing
3 changed file
with
121 addition
and
227 deletion
+121
-227
tests/CMakeLists.txt
tests/CMakeLists.txt
+1
-0
tests/eosd_run_test.py
tests/eosd_run_test.py
+10
-6
tests/testUtils.py
tests/testUtils.py
+110
-221
未找到文件。
tests/CMakeLists.txt
浏览文件 @
6e1de5e6
...
...
@@ -51,3 +51,4 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/trans_sync_across_mixed_cluster_test.
configure_file
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/distributed-transactions-test.py
${
CMAKE_CURRENT_BINARY_DIR
}
/distributed-transactions-test.py COPYONLY
)
configure_file
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/restart-scenarios-test.py
${
CMAKE_CURRENT_BINARY_DIR
}
/restart-scenarios-test.py COPYONLY
)
configure_file
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/testUtils.py
${
CMAKE_CURRENT_BINARY_DIR
}
/testUtils.py COPYONLY
)
configure_file
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/eosd_run_test.py
${
CMAKE_CURRENT_BINARY_DIR
}
/eosd_run_test.py COPYONLY
)
tests/eosd_run_test.py
浏览文件 @
6e1de5e6
...
...
@@ -258,11 +258,12 @@ try:
transferAmount
=
975311
Print
(
"Transfer funds %d from account %s to %s"
%
(
transferAmount
,
testeraAccount
.
name
,
currencyAccount
.
name
))
trans
Id
=
node
.
transferFunds
(
testeraAccount
,
currencyAccount
,
transferAmount
,
"test transfer a->b"
)
if
trans
Id
is
None
:
trans
=
node
.
transferFunds
(
testeraAccount
,
currencyAccount
,
transferAmount
,
"test transfer a->b"
)
if
trans
is
None
:
cmdError
(
"eosc transfer"
)
errorExit
(
"Failed to transfer funds %d from account %s to %s"
%
(
transferAmount
,
initaAccount
.
name
,
testeraAccount
.
name
))
transId
=
testUtils
.
Node
.
getTransId
(
trans
)
expectedAmount
=
975311
Print
(
"Verify transfer, Expected: %d"
%
(
expectedAmount
))
...
...
@@ -276,7 +277,7 @@ try:
expectedAccounts
=
[
testeraAccount
.
name
,
currencyAccount
.
name
,
exchangeAccount
.
name
]
Print
(
"Get accounts by key %s, Expected: %s"
%
(
PUB_KEY3
,
expectedAccounts
))
actualAccounts
=
node
.
getAccountsByKey
(
PUB_KEY3
)
actualAccounts
=
node
.
getAccounts
Arr
ByKey
(
PUB_KEY3
)
if
actualAccounts
is
None
:
cmdError
(
"eosc get accounts pub_key3"
)
errorExit
(
"Failed to retrieve accounts by key %s"
%
(
PUB_KEY3
))
...
...
@@ -287,7 +288,7 @@ try:
expectedAccounts
=
[
testeraAccount
.
name
]
Print
(
"Get accounts by key %s, Expected: %s"
%
(
PUB_KEY1
,
expectedAccounts
))
actualAccounts
=
node
.
getAccountsByKey
(
PUB_KEY1
)
actualAccounts
=
node
.
getAccounts
Arr
ByKey
(
PUB_KEY1
)
if
actualAccounts
is
None
:
cmdError
(
"eosc get accounts pub_key1"
)
errorExit
(
"Failed to retrieve accounts by key %s"
%
(
PUB_KEY1
))
...
...
@@ -319,12 +320,15 @@ try:
node
.
waitForTransIdOnNode
(
transId
)
Print
(
"Get transaction details %s"
%
(
transId
))
transaction
=
node
.
getTransaction
Details
(
transId
)
transaction
=
node
.
getTransaction
(
transId
)
if
transaction
is
None
:
cmdError
(
"eosc get transaction trans_id"
)
errorExit
(
"Failed to retrieve transaction details %s"
%
(
transId
))
if
transaction
.
tType
!=
"transfer"
or
transaction
.
amount
!=
975311
:
typeVal
=
transaction
[
"transaction"
][
"messages"
][
0
][
"type"
]
amountVal
=
transaction
[
"transaction"
][
"messages"
][
0
][
"data"
][
"amount"
]
if
typeVal
!=
"transfer"
or
amountVal
!=
975311
:
#if transaction.tType != "transfer" or transaction.amount != 975311:
errorExit
(
"FAILURE - get transaction trans_id failed: %s"
%
(
transId
),
raw
=
True
)
Print
(
"Get transactions for account %s"
%
(
testeraAccount
.
name
))
...
...
tests/testUtils.py
浏览文件 @
6e1de5e6
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录