forked from TrueCloudLab/frostfs-testcases
fixed [#233]; keywords from neofs-keywords
moved to neofs-testcases
Signed-off-by: anastasia prasolova <anastasia@nspcc.ru>
This commit is contained in:
parent
b1b86351df
commit
34d282cf5a
19 changed files with 147 additions and 72 deletions
31
robot/resources/lib/python_keywords/epoch.py
Normal file
31
robot/resources/lib/python_keywords/epoch.py
Normal file
|
@ -0,0 +1,31 @@
|
|||
#!/usr/bin/python3.9
|
||||
|
||||
|
||||
import contract
|
||||
from robot.api import logger
|
||||
from robot.api.deco import keyword
|
||||
from robot.libraries.BuiltIn import BuiltIn
|
||||
|
||||
IR_WALLET_PATH = BuiltIn().get_variable_value("${IR_WALLET_PATH}")
|
||||
IR_WALLET_PASS = BuiltIn().get_variable_value("${IR_WALLET_PASS}")
|
||||
SIDECHAIN_EP = BuiltIn().get_variable_value("${MORPH_ENDPOINT}")
|
||||
|
||||
|
||||
@keyword('Get Epoch')
|
||||
def get_epoch():
|
||||
epoch = int(contract.testinvoke_contract(
|
||||
contract.get_netmap_contract_hash(SIDECHAIN_EP),
|
||||
'epoch',
|
||||
SIDECHAIN_EP)
|
||||
)
|
||||
logger.info(f"Got epoch {epoch}")
|
||||
return epoch
|
||||
|
||||
|
||||
@keyword('Tick Epoch')
|
||||
def tick_epoch():
|
||||
cur_epoch = get_epoch()
|
||||
return contract.invoke_contract_multisig(
|
||||
contract.get_netmap_contract_hash(SIDECHAIN_EP),
|
||||
f"newEpoch int:{cur_epoch+1}",
|
||||
IR_WALLET_PATH, IR_WALLET_PASS, SIDECHAIN_EP)
|
Loading…
Add table
Add a link
Reference in a new issue