2021-09-09 08:13:37 +00:00
*** Settings ***
2021-12-09 10:58:51 +00:00
Variables common.py
2021-09-09 08:13:37 +00:00
Library Process
Library contract_keywords.py
Library neofs.py
Library String
Library acl.py
Resource setup_teardown.robot
Resource payment_operations.robot
*** Test Cases ***
Control Operations with storage nodes
[Documentation] Testcase to check NetworkInfo control command.
[Tags] NeoFSCLI NetworkInfo
[Timeout] 5 min
[Setup] Setup
2022-02-01 13:42:41 +00:00
${NODE_NUM} ${NODE} ${WIF} = Get control endpoint with wif
${WALLET_STORAGE} ${ADDR_STORAGE} = Prepare Wallet with WIF And Deposit ${WIF}
2021-09-09 08:13:37 +00:00
${empty_list} = Create List
2022-02-01 13:42:41 +00:00
${SNAPSHOT} = Run Process ${NEOFS_CLI_EXEC} control netmap-snapshot --endpoint ${NODE} --wallet ${WALLET_STORAGE} --config ${WALLET_PASS} shell=True
${HEALTHCHECK} = Run Process ${NEOFS_CLI_EXEC} control healthcheck --endpoint ${NODE} --wallet ${WALLET_STORAGE} --config ${WALLET_PASS} shell=True
2021-09-09 08:13:37 +00:00
Should Be Equal As Integers ${HEALTHCHECK.rc} 0
2022-02-01 13:42:41 +00:00
Run Process ${NEOFS_CLI_EXEC} control set-status --endpoint ${NODE} --wallet ${WALLET_STORAGE} --config ${WALLET_PASS} --status 'offline' shell=True
2021-09-09 08:13:37 +00:00
Sleep ${MAINNET_BLOCK_TIME}
Tick Epoch
2022-02-01 13:42:41 +00:00
${SNAPSHOT_OFFLINE}= Run Process ${NEOFS_CLI_EXEC} control netmap-snapshot --endpoint ${NODE} --wallet ${WALLET_STORAGE} --config ${WALLET_PASS} shell=True
2021-09-09 08:13:37 +00:00
${NODE_NUM_OFFLINE}= Get Regexp Matches ${SNAPSHOT_OFFLINE.stdout} ${NODE_NUM}
Should Be Equal ${NODE_NUM_OFFLINE} ${empty_list}
2022-02-01 13:42:41 +00:00
${HEALTHCHECK_OFFLINE} = Run Process ${NEOFS_CLI_EXEC} control healthcheck --endpoint ${NODE} --wallet ${WALLET_STORAGE} --config ${WALLET_PASS} shell=True
2021-09-09 08:13:37 +00:00
Should Be Equal As Integers ${HEALTHCHECK_OFFLINE.rc} 0
Should Not Be Equal ${HEALTHCHECK.stdout} ${HEALTHCHECK_OFFLINE.stdout}
2022-02-01 13:42:41 +00:00
Run Process ${NEOFS_CLI_EXEC} control set-status --endpoint ${NODE} --wallet ${WALLET_STORAGE} --config ${WALLET_PASS} --status 'online' shell=True
2021-09-09 08:13:37 +00:00
Sleep ${MAINNET_BLOCK_TIME}
Tick Epoch
2022-02-01 13:42:41 +00:00
${SNAPSHOT_ONLINE} = Run Process ${NEOFS_CLI_EXEC} control netmap-snapshot --endpoint ${NODE} --wallet ${WALLET_STORAGE} --config ${WALLET_PASS} shell=True
2021-09-09 08:13:37 +00:00
${NODE_NUM_ONLINE} = Get Regexp Matches ${SNAPSHOT_ONLINE.stdout} ${NODE_NUM}
Should Be Equal ${NODE_NUM_ONLINE}[0] ${NODE_NUM}
2022-02-01 13:42:41 +00:00
${HEALTHCHECK_ONLINE} = Run Process ${NEOFS_CLI_EXEC} control healthcheck --endpoint ${NODE} --wallet ${WALLET_STORAGE} --config ${WALLET_PASS} shell=True
2021-09-09 08:13:37 +00:00
Should Be Equal As Integers ${HEALTHCHECK_ONLINE.rc} 0
Should Be Equal ${HEALTHCHECK.stdout} ${HEALTHCHECK_ONLINE.stdout}
[Teardown] Teardown netmap_control