update
This commit is contained in:
parent
d31de2a9ef
commit
8774839dbe
2 changed files with 10 additions and 22 deletions
|
@ -80,7 +80,7 @@ python3 -m robot.testdoc robot/testsuites/integration/ docs/testcases.html
|
||||||
|
|
||||||
`robot/testsuites/fi/` - Fault Injection test suites and test cases
|
`robot/testsuites/fi/` - Fault Injection test suites and test cases
|
||||||
|
|
||||||
## Code style
|
### Code style
|
||||||
|
|
||||||
Robot Framework keyword should use space as a separator between particular words
|
Robot Framework keyword should use space as a separator between particular words
|
||||||
|
|
||||||
|
@ -99,10 +99,10 @@ Name of other variables should not be ended with underscore symbol
|
||||||
|
|
||||||
On keywords definition, one should specify variable type, e.g. path: str
|
On keywords definition, one should specify variable type, e.g. path: str
|
||||||
|
|
||||||
## Robot style
|
### Robot style
|
||||||
|
|
||||||
Следует всегда заполнять секции [Tags] и [Documentation] для Testcase'ов и Documentation для Test Suite'ов.
|
Следует всегда заполнять секции [Tags] и [Documentation] для Testcase'ов и Documentation для Test Suite'ов.
|
||||||
|
|
||||||
## Robot-framework User Guide
|
### Robot-framework User Guide
|
||||||
|
|
||||||
http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html
|
http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html
|
|
@ -100,10 +100,13 @@ def withdraw_mainnet_gas(wallet: str, address: str, scripthash: str, amount: int
|
||||||
out = _run_sh_with_passwd('', cmd)
|
out = _run_sh_with_passwd('', cmd)
|
||||||
logger.info(f"Command completed with output: {out}")
|
logger.info(f"Command completed with output: {out}")
|
||||||
|
|
||||||
#if not re.match(r'^(\w{64})$', out):
|
m = re.match(r'^Sent invocation transaction (\w{64})$', out)
|
||||||
# raise Exception("Can not get Tx.")
|
if m is None:
|
||||||
|
raise Exception("Can not get Tx.")
|
||||||
|
|
||||||
|
tx = m.group(1)
|
||||||
|
|
||||||
return out
|
return tx
|
||||||
|
|
||||||
|
|
||||||
@keyword('Mainnet Balance')
|
@keyword('Mainnet Balance')
|
||||||
|
@ -127,7 +130,7 @@ def mainnet_balance(address: str):
|
||||||
|
|
||||||
|
|
||||||
@keyword('Expexted Mainnet Balance')
|
@keyword('Expexted Mainnet Balance')
|
||||||
def expected_mainnet_balance(address: str, expected: int):
|
def expected_mainnet_balance(address: str, expected: float):
|
||||||
|
|
||||||
amount = mainnet_balance(address)
|
amount = mainnet_balance(address)
|
||||||
|
|
||||||
|
@ -198,21 +201,6 @@ def get_transaction(tx_id: str):
|
||||||
logger.info(complProc.stdout)
|
logger.info(complProc.stdout)
|
||||||
|
|
||||||
|
|
||||||
@keyword('Request NeoFS Deposit')
|
|
||||||
def request_neofs_deposit(public_key: str):
|
|
||||||
"""
|
|
||||||
This function requests Deposit to the selected public key.
|
|
||||||
:param public_key: neo public key
|
|
||||||
"""
|
|
||||||
|
|
||||||
response = requests.get('https://fs.localtest.nspcc.ru/api/deposit/'+str(public_key), verify='ca/nspcc-ca.pem')
|
|
||||||
|
|
||||||
if response.status_code != 200:
|
|
||||||
BuiltIn().fatal_error('Can not run Deposit to {} with error: {}'.format(public_key, response.text))
|
|
||||||
else:
|
|
||||||
logger.info("Deposit has been completed for '%s'; tx: '%s'" % (public_key, response.text) )
|
|
||||||
|
|
||||||
return response.text
|
|
||||||
|
|
||||||
@keyword('Get Balance')
|
@keyword('Get Balance')
|
||||||
def get_balance(privkey: str):
|
def get_balance(privkey: str):
|
||||||
|
|
Loading…
Reference in a new issue