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
2022-07-04 19:49:14 +00:00
Library epoch.py
2021-09-09 08:13:37 +00:00
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-06-24 12:19:25 +00:00
${NODE_NUM} ${NODE} ${STORAGE_WALLET} = Get control endpoint and wallet
2021-09-09 08:13:37 +00:00
${empty_list} = Create List
2022-06-24 12:19:25 +00:00
${SNAPSHOT} = Run Process ${NEOFS_CLI_EXEC} control netmap-snapshot --endpoint ${NODE} --wallet ${STORAGE_WALLET} --config ${WALLET_CONFIG} shell=True
${HEALTHCHECK} = Run Process ${NEOFS_CLI_EXEC} control healthcheck --endpoint ${NODE} --wallet ${STORAGE_WALLET} --config ${WALLET_CONFIG} shell=True
2021-09-09 08:13:37 +00:00
Should Be Equal As Integers ${HEALTHCHECK.rc} 0
2022-06-24 12:19:25 +00:00
Run Process ${NEOFS_CLI_EXEC} control set-status --endpoint ${NODE} --wallet ${STORAGE_WALLET} --config ${WALLET_CONFIG} --status 'offline' shell=True
2022-07-04 19:49:14 +00:00
2021-09-09 08:13:37 +00:00
Sleep ${MAINNET_BLOCK_TIME}
Tick Epoch
2022-06-24 12:19:25 +00:00
${SNAPSHOT_OFFLINE}= Run Process ${NEOFS_CLI_EXEC} control netmap-snapshot --endpoint ${NODE} --wallet ${STORAGE_WALLET} --config ${WALLET_CONFIG} 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-06-24 12:19:25 +00:00
${HEALTHCHECK_OFFLINE} = Run Process ${NEOFS_CLI_EXEC} control healthcheck --endpoint ${NODE} --wallet ${STORAGE_WALLET} --config ${WALLET_CONFIG} shell=True
2021-09-09 08:13:37 +00:00
Should Be Equal As Integers ${HEALTHCHECK_OFFLINE.rc} 0
2022-07-04 19:49:14 +00:00
Should Not Be Equal ${HEALTHCHECK.stdout} ${HEALTHCHECK_OFFLINE.stdout}
2022-06-24 12:19:25 +00:00
Run Process ${NEOFS_CLI_EXEC} control set-status --endpoint ${NODE} --wallet ${STORAGE_WALLET} --config ${WALLET_CONFIG} --status 'online' shell=True
2021-09-09 08:13:37 +00:00
Sleep ${MAINNET_BLOCK_TIME}
Tick Epoch
2022-06-24 12:19:25 +00:00
${SNAPSHOT_ONLINE} = Run Process ${NEOFS_CLI_EXEC} control netmap-snapshot --endpoint ${NODE} --wallet ${STORAGE_WALLET} --config ${WALLET_CONFIG} shell=True
2022-07-04 19:49:14 +00:00
${NODE_NUM_ONLINE} = Get Regexp Matches ${SNAPSHOT_ONLINE.stdout} ${NODE_NUM}
2021-09-09 08:13:37 +00:00
Should Be Equal ${NODE_NUM_ONLINE}[0] ${NODE_NUM}
2022-06-24 12:19:25 +00:00
${HEALTHCHECK_ONLINE} = Run Process ${NEOFS_CLI_EXEC} control healthcheck --endpoint ${NODE} --wallet ${STORAGE_WALLET} --config ${WALLET_CONFIG} shell=True
2021-09-09 08:13:37 +00:00
Should Be Equal As Integers ${HEALTHCHECK_ONLINE.rc} 0
2022-07-04 19:49:14 +00:00
Should Be Equal ${HEALTHCHECK.stdout} ${HEALTHCHECK_ONLINE.stdout}
2021-09-09 08:13:37 +00:00
[Teardown] Teardown netmap_control