From 8216ab71faf8b26f93130fa4d7eacef1280939ad Mon Sep 17 00:00:00 2001 From: Elizaveta Chichindaeva Date: Wed, 12 Jan 2022 10:39:53 +0300 Subject: [PATCH] [#165] Full path to neofs-cli Signed-off-by: Elizaveta Chichindaeva --- robot/resources/lib/robot/storage.robot | 2 +- .../integration/cli/accounting/balance.robot | 12 ++++++------ .../cli/netmap/networkinfo_rpc_method.robot | 8 ++++---- .../integration/network/netmap_control.robot | 16 ++++++++-------- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/robot/resources/lib/robot/storage.robot b/robot/resources/lib/robot/storage.robot index 580d4e3..3ecfc87 100644 --- a/robot/resources/lib/robot/storage.robot +++ b/robot/resources/lib/robot/storage.robot @@ -9,7 +9,7 @@ Library Process Drop object [Arguments] ${NODE} ${WIF_STORAGE} ${CID} ${OID} - ${DROP_SIMPLE} = Run Process neofs-cli control drop-objects --endpoint ${NODE} --wif ${WIF_STORAGE} -o ${CID}/${OID} + ${DROP_SIMPLE} = Run Process ${NEOFS_CLI_EXEC} control drop-objects --endpoint ${NODE} --wif ${WIF_STORAGE} -o ${CID}/${OID} ... shell=True Log Many stdout: ${DROP_SIMPLE.stdout} stderr: ${DROP_SIMPLE.stderr} Should Be Equal As Integers ${DROP_SIMPLE.rc} 0 Got non-zero return code from CLI diff --git a/robot/testsuites/integration/cli/accounting/balance.robot b/robot/testsuites/integration/cli/accounting/balance.robot index b4a43ec..06de1fb 100644 --- a/robot/testsuites/integration/cli/accounting/balance.robot +++ b/robot/testsuites/integration/cli/accounting/balance.robot @@ -25,36 +25,36 @@ CLI Accounting Balance Test ${WALLET} ${ADDR} ${WIF} = Prepare Wallet And Deposit ${DEPOSIT_AMOUNT} # Getting balance with WIF - ${OUTPUT} = Run Process neofs-cli accounting balance -r ${NEOFS_ENDPOINT} --wif ${WIF} + ${OUTPUT} = Run Process ${NEOFS_CLI_EXEC} accounting balance -r ${NEOFS_ENDPOINT} --wif ${WIF} ... shell=True Should Be Equal As Numbers ${OUTPUT.stdout} ${DEPOSIT_AMOUNT} # Getting balance with wallet and address ${OUTPUT} = Run Process And Enter Empty Password - ... neofs-cli accounting balance -r ${NEOFS_ENDPOINT} --address ${ADDR} --wallet ${WALLET} + ... ${NEOFS_CLI_EXEC} accounting balance -r ${NEOFS_ENDPOINT} --address ${ADDR} --wallet ${WALLET} Should Be Equal As Numbers ${OUTPUT} ${DEPOSIT_AMOUNT} # Getting balance with wallet only ${OUTPUT} = Run Process And Enter Empty Password - ... neofs-cli accounting balance -r ${NEOFS_ENDPOINT} --wallet ${WALLET} + ... ${NEOFS_CLI_EXEC} accounting balance -r ${NEOFS_ENDPOINT} --wallet ${WALLET} Should Be Equal As Numbers ${OUTPUT} ${DEPOSIT_AMOUNT} # Getting balance with wallet and wrong address ${ANOTHER_WALLET} ${ANOTHER_ADDR} ${ANOTHER_WIF} = Init Wallet With Address ${ASSETS_DIR} - ${OUTPUT} = Run Process neofs-cli accounting balance -r ${NEOFS_ENDPOINT} --address ${ANOTHER_ADDR} --wallet ${WALLET} + ${OUTPUT} = Run Process ${NEOFS_CLI_EXEC} accounting balance -r ${NEOFS_ENDPOINT} --address ${ANOTHER_ADDR} --wallet ${WALLET} ... shell=True Should Be Equal As Strings ${OUTPUT.stderr} --address option must be specified and valid Should Be Equal As Numbers ${OUTPUT.rc} 1 # Getting balance with control API ${CONFIG_PATH} = Write API Config ${NEOFS_ENDPOINT} ${WIF} - ${OUTPUT} = Run Process neofs-cli accounting balance --config ${CONFIG_PATH} + ${OUTPUT} = Run Process ${NEOFS_CLI_EXEC} accounting balance --config ${CONFIG_PATH} ... shell=True Should Be Equal As Numbers ${OUTPUT.stdout} ${DEPOSIT_AMOUNT} # Getting balance with binary key ${KEY_PATH} = WIF To Binary ${WIF} - ${OUTPUT} = Run Process neofs-cli accounting balance -r ${NEOFS_ENDPOINT} --binary-key ${KEY_PATH} + ${OUTPUT} = Run Process ${NEOFS_CLI_EXEC} accounting balance -r ${NEOFS_ENDPOINT} --binary-key ${KEY_PATH} ... shell=True Should Be Equal As Numbers ${OUTPUT.stdout} ${DEPOSIT_AMOUNT} diff --git a/robot/testsuites/integration/cli/netmap/networkinfo_rpc_method.robot b/robot/testsuites/integration/cli/netmap/networkinfo_rpc_method.robot index 267f5e9..ee1d1a8 100644 --- a/robot/testsuites/integration/cli/netmap/networkinfo_rpc_method.robot +++ b/robot/testsuites/integration/cli/netmap/networkinfo_rpc_method.robot @@ -24,9 +24,9 @@ NetworkInfo RPC Method # Checking if the command returns equal results for two storage nodes ###################################################################### - ${RESULT1_S01} Run Process neofs-cli netmap netinfo -r ${SN_01_ADDR} --wif ${MAINNET_WALLET_WIF} shell=True + ${RESULT1_S01} Run Process ${NEOFS_CLI_EXEC} netmap netinfo -r ${SN_01_ADDR} --wif ${MAINNET_WALLET_WIF} shell=True Should Be Equal As Integers ${RESULT1_S01.rc} 0 - ${RESULT1_S02} Run Process neofs-cli netmap netinfo -r ${SN_02_ADDR} --wif ${MAINNET_WALLET_WIF} shell=True + ${RESULT1_S02} Run Process ${NEOFS_CLI_EXEC} netmap netinfo -r ${SN_02_ADDR} --wif ${MAINNET_WALLET_WIF} shell=True Should Be Equal As Integers ${RESULT1_S02.rc} 0 ############################################# @@ -53,9 +53,9 @@ NetworkInfo RPC Method Tick Epoch - ${RESULT2_S01} Run Process neofs-cli netmap netinfo -r ${SN_01_ADDR} --wif ${MAINNET_WALLET_WIF} shell=True + ${RESULT2_S01} Run Process ${NEOFS_CLI_EXEC} netmap netinfo -r ${SN_01_ADDR} --wif ${MAINNET_WALLET_WIF} shell=True Should Be Equal As Integers ${RESULT2_S01.rc} 0 - ${RESULT2_S02} Run Process neofs-cli netmap netinfo -r ${SN_02_ADDR} --wif ${MAINNET_WALLET_WIF} shell=True + ${RESULT2_S02} Run Process ${NEOFS_CLI_EXEC} netmap netinfo -r ${SN_02_ADDR} --wif ${MAINNET_WALLET_WIF} shell=True Should Be Equal As Integers ${RESULT2_S02.rc} 0 Should Be Equal As Strings ${RESULT2_S01.stdout} ${RESULT2_S02.stdout} diff --git a/robot/testsuites/integration/network/netmap_control.robot b/robot/testsuites/integration/network/netmap_control.robot index e028e45..dde95fe 100644 --- a/robot/testsuites/integration/network/netmap_control.robot +++ b/robot/testsuites/integration/network/netmap_control.robot @@ -21,33 +21,33 @@ Control Operations with storage nodes ${NODE_NUM} ${NODE} ${WIF} = Get control endpoint with wif ${empty_list} = Create List - ${SNAPSHOT} = Run Process neofs-cli control netmap-snapshot --endpoint ${NODE} --wif ${WIF} shell=True - ${HEALTHCHECK} = Run Process neofs-cli control healthcheck --endpoint ${NODE} --wif ${WIF} shell=True + ${SNAPSHOT} = Run Process ${NEOFS_CLI_EXEC} control netmap-snapshot --endpoint ${NODE} --wif ${WIF} shell=True + ${HEALTHCHECK} = Run Process ${NEOFS_CLI_EXEC} control healthcheck --endpoint ${NODE} --wif ${WIF} shell=True Should Be Equal As Integers ${HEALTHCHECK.rc} 0 - Run Process neofs-cli control set-status --endpoint ${NODE} --wif ${WIF} --status 'offline' shell=True + Run Process ${NEOFS_CLI_EXEC} control set-status --endpoint ${NODE} --wif ${WIF} --status 'offline' shell=True Sleep ${MAINNET_BLOCK_TIME} Tick Epoch - ${SNAPSHOT_OFFLINE}= Run Process neofs-cli control netmap-snapshot --endpoint ${NODE} --wif ${WIF} shell=True + ${SNAPSHOT_OFFLINE}= Run Process ${NEOFS_CLI_EXEC} control netmap-snapshot --endpoint ${NODE} --wif ${WIF} shell=True ${NODE_NUM_OFFLINE}= Get Regexp Matches ${SNAPSHOT_OFFLINE.stdout} ${NODE_NUM} Should Be Equal ${NODE_NUM_OFFLINE} ${empty_list} - ${HEALTHCHECK_OFFLINE} = Run Process neofs-cli control healthcheck --endpoint ${NODE} --wif ${WIF} shell=True + ${HEALTHCHECK_OFFLINE} = Run Process ${NEOFS_CLI_EXEC} control healthcheck --endpoint ${NODE} --wif ${WIF} shell=True Should Be Equal As Integers ${HEALTHCHECK_OFFLINE.rc} 0 Should Not Be Equal ${HEALTHCHECK.stdout} ${HEALTHCHECK_OFFLINE.stdout} - Run Process neofs-cli control set-status --endpoint ${NODE} --wif ${WIF} --status 'online' shell=True + Run Process ${NEOFS_CLI_EXEC} control set-status --endpoint ${NODE} --wif ${WIF} --status 'online' shell=True Sleep ${MAINNET_BLOCK_TIME} Tick Epoch - ${SNAPSHOT_ONLINE} = Run Process neofs-cli control netmap-snapshot --endpoint ${NODE} --wif ${WIF} shell=True + ${SNAPSHOT_ONLINE} = Run Process ${NEOFS_CLI_EXEC} control netmap-snapshot --endpoint ${NODE} --wif ${WIF} shell=True ${NODE_NUM_ONLINE} = Get Regexp Matches ${SNAPSHOT_ONLINE.stdout} ${NODE_NUM} Should Be Equal ${NODE_NUM_ONLINE}[0] ${NODE_NUM} - ${HEALTHCHECK_ONLINE} = Run Process neofs-cli control healthcheck --endpoint ${NODE} --wif ${WIF} shell=True + ${HEALTHCHECK_ONLINE} = Run Process ${NEOFS_CLI_EXEC} control healthcheck --endpoint ${NODE} --wif ${WIF} shell=True Should Be Equal As Integers ${HEALTHCHECK_ONLINE.rc} 0 Should Be Equal ${HEALTHCHECK.stdout} ${HEALTHCHECK_ONLINE.stdout}