diff --git a/robot/resources/lib/python/acl.py b/robot/resources/lib/python/acl.py index 4ece4e1..038ef03 100644 --- a/robot/resources/lib/python/acl.py +++ b/robot/resources/lib/python/acl.py @@ -38,7 +38,7 @@ class Role(AutoName): @keyword('Get eACL') def get_eacl(wif: str, cid: str): cmd = ( - f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wif {wif} ' + f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wallet {wif} ' f'container get-eacl --cid {cid}' ) logger.info(f"cmd: {cmd}") @@ -56,7 +56,7 @@ def get_eacl(wif: str, cid: str): @keyword('Set eACL') def set_eacl(wif: str, cid: str, eacl_table_path: str): cmd = ( - f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wif {wif} ' + f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wallet {wif} ' f'container set-eacl --cid {cid} --table {eacl_table_path} --await' ) logger.info(f"cmd: {cmd}") @@ -149,7 +149,7 @@ def form_bearertoken_file(wif: str, cid: str, eacl_records: list) -> str: def sign_bearer_token(wif: str, eacl_rules_file: str): cmd = ( f'{NEOFS_CLI_EXEC} util sign bearer-token --from {eacl_rules_file} ' - f'--to {eacl_rules_file} --wif {wif} --json' + f'--to {eacl_rules_file} --wallet {wif} --json' ) logger.info(f"cmd: {cmd}") _cmd_run(cmd) diff --git a/robot/resources/lib/python/neofs.py b/robot/resources/lib/python/neofs.py index 5135ccd..5881827 100644 --- a/robot/resources/lib/python/neofs.py +++ b/robot/resources/lib/python/neofs.py @@ -127,7 +127,7 @@ def get_range(private_key: str, cid: str, oid: str, range_file: str, bearer: str bearer_token = f"--bearer {bearer}" Cmd = ( - f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wif {private_key} ' + f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wallet {private_key} ' f'object range --cid {cid} --oid {oid} {bearer_token} --range {range_cut} ' f'--file {ASSETS_DIR}/{range_file} {options}' ) @@ -148,7 +148,7 @@ def create_container(private_key: str, basic_acl:str, rule:str, user_headers: st session = f"--session {session}" createContainerCmd = ( - f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wif {private_key} ' + f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wallet {private_key} ' f'container create --policy "{rule}" {basic_acl} {user_headers} {session} --await' ) logger.info(f"Cmd: {createContainerCmd}") @@ -161,7 +161,7 @@ def create_container(private_key: str, basic_acl:str, rule:str, user_headers: st @keyword('Container List') def container_list(private_key: str): Cmd = ( - f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wif {private_key} ' + f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wallet {private_key} ' f'container list' ) logger.info(f"Cmd: {Cmd}") @@ -175,7 +175,7 @@ def container_list(private_key: str): @keyword('Container Existing') def container_existing(private_key: str, cid: str): Cmd = ( - f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wif {private_key} ' + f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wallet {private_key} ' f'container list' ) logger.info(f"Cmd: {Cmd}") @@ -199,7 +199,7 @@ def search_object(private_key: str, cid: str, keys: str, bearer: str, filters: s filters_result += f"--filters '{filter_item}' " object_cmd = ( - f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wif {private_key} ' + f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wallet {private_key} ' f'object search {keys} --cid {cid} {bearer_token} {filters_result} {options}' ) logger.info(f"Cmd: {object_cmd}") @@ -453,7 +453,7 @@ def _get_raw_split_information(header): @keyword('Verify Head Tombstone') def verify_head_tombstone(private_key: str, cid: str, oid_ts: str, oid: str, addr: str): object_cmd = ( - f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wif {private_key} ' + f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wallet {private_key} ' f'object head --cid {cid} --oid {oid_ts} --json' ) logger.info(f"Cmd: {object_cmd}") @@ -512,7 +512,7 @@ def head_object(private_key: str, cid: str, oid: str, bearer_token: str="", endpoint = NEOFS_ENDPOINT object_cmd = ( - f'{NEOFS_CLI_EXEC} --rpc-endpoint {endpoint} --wif {private_key} object ' + f'{NEOFS_CLI_EXEC} --rpc-endpoint {endpoint} --wallet {private_key} object ' f'head --cid {cid} --oid {oid} {bearer_token} {options} {"--json" if json_output else ""}' ) logger.info(f"Cmd: {object_cmd}") @@ -534,7 +534,7 @@ def get_container_attributes(private_key: str, cid: str, endpoint: str="", json_ endpoint = NEOFS_ENDPOINT container_cmd = ( - f'{NEOFS_CLI_EXEC} --rpc-endpoint {endpoint} --wif {private_key} ' + f'{NEOFS_CLI_EXEC} --rpc-endpoint {endpoint} --wallet {private_key} ' f'--cid {cid} container get {"--json" if json_output else ""}' ) logger.info(f"Cmd: {container_cmd}") @@ -690,7 +690,7 @@ def delete_object(private_key: str, cid: str, oid: str, bearer: str, options: st bearer_token = f"--bearer {bearer}" object_cmd = ( - f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wif {private_key} ' + f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wallet {private_key} ' f'object delete --cid {cid} --oid {oid} {bearer_token} {options}' ) logger.info(f"Cmd: {object_cmd}") @@ -705,7 +705,7 @@ def delete_object(private_key: str, cid: str, oid: str, bearer: str, options: st def delete_container(cid: str, private_key: str): deleteContainerCmd = ( - f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wif {private_key} ' + f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wallet {private_key} ' f'container delete --cid {cid}' ) logger.info(f"Cmd: {deleteContainerCmd}") @@ -748,7 +748,7 @@ def put_object(private_key: str, path: str, cid: str, bearer: str, user_headers: bearer = f"--bearer {bearer}" putobject_cmd = ( - f'{NEOFS_CLI_EXEC} --rpc-endpoint {endpoint} --wif {private_key} object ' + f'{NEOFS_CLI_EXEC} --rpc-endpoint {endpoint} --wallet {private_key} object ' f'put --file {path} --cid {cid} {bearer} {user_headers} {options}' ) logger.info(f"Cmd: {putobject_cmd}") @@ -850,7 +850,7 @@ def get_range_hash(private_key: str, cid: str, oid: str, bearer_token: str, bearer_token = f"--bearer {bearer_token}" object_cmd = ( - f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wif {private_key} ' + f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wallet {private_key} ' f'object hash --cid {cid} --oid {oid} --range {range_cut} ' f'{bearer_token} {options}' ) @@ -873,7 +873,7 @@ def get_object(private_key: str, cid: str, oid: str, bearer_token: str, bearer_token = f"--bearer {bearer_token}" object_cmd = ( - f'{NEOFS_CLI_EXEC} --rpc-endpoint {endpoint} --wif {private_key} ' + f'{NEOFS_CLI_EXEC} --rpc-endpoint {endpoint} --wallet {private_key} ' f'object get --cid {cid} --oid {oid} --file {file_path} {bearer_token} ' f'{options}' ) @@ -892,7 +892,7 @@ def put_storagegroup(private_key: str, cid: str, bearer_token: str="", *oid_list bearer_token = f"--bearer {bearer_token}" object_cmd = ( - f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wif {private_key} storagegroup ' + f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wallet {private_key} storagegroup ' f'put --cid {cid} --members {cmd_oid_line} {bearer_token}' ) logger.info(f"Cmd: {object_cmd}") @@ -909,7 +909,7 @@ def list_storagegroup(private_key: str, cid: str, bearer_token: str="", *expecte bearer_token = f"--bearer {bearer_token}" object_cmd = ( - f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wif {private_key} ' + f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wallet {private_key} ' f'storagegroup list --cid {cid} {bearer_token}' ) @@ -932,7 +932,7 @@ def get_storagegroup(private_key: str, cid: str, oid: str, bearer_token: str, ex if bearer_token: bearer_token = f"--bearer {bearer_token}" - object_cmd = f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wif {private_key} storagegroup get --cid {cid} --id {oid} {bearer_token}' + object_cmd = f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wallet {private_key} storagegroup get --cid {cid} --id {oid} {bearer_token}' logger.info(f"Cmd: {object_cmd}") output = _cmd_run(object_cmd) @@ -958,7 +958,7 @@ def delete_storagegroup(private_key: str, cid: str, oid: str, bearer_token: str= bearer_token = f"--bearer {bearer_token}" object_cmd = ( - f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wif {private_key} storagegroup ' + f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wallet {private_key} storagegroup ' f'delete --cid {cid} --id {oid} {bearer_token}' ) logger.info(f"Cmd: {object_cmd}") @@ -1091,7 +1091,7 @@ def _search_object(node:str, private_key: str, cid:str, oid: str): if oid: oid_cmd = "--oid %s" % oid Cmd = ( - f'{NEOFS_CLI_EXEC} --rpc-endpoint {node} --wif {private_key} --ttl 1 ' + f'{NEOFS_CLI_EXEC} --rpc-endpoint {node} --wallet {private_key} --ttl 1 ' f'object search --root --cid {cid} {oid_cmd}' ) diff --git a/robot/resources/lib/robot/storage.robot b/robot/resources/lib/robot/storage.robot index 3ecfc87..530d602 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_EXEC} control drop-objects --endpoint ${NODE} --wif ${WIF_STORAGE} -o ${CID}/${OID} + ${DROP_SIMPLE} = Run Process ${NEOFS_CLI_EXEC} control drop-objects --endpoint ${NODE} --wallet ${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 06de1fb..96b402b 100644 --- a/robot/testsuites/integration/cli/accounting/balance.robot +++ b/robot/testsuites/integration/cli/accounting/balance.robot @@ -25,7 +25,7 @@ CLI Accounting Balance Test ${WALLET} ${ADDR} ${WIF} = Prepare Wallet And Deposit ${DEPOSIT_AMOUNT} # Getting balance with WIF - ${OUTPUT} = Run Process ${NEOFS_CLI_EXEC} accounting balance -r ${NEOFS_ENDPOINT} --wif ${WIF} + ${OUTPUT} = Run Process ${NEOFS_CLI_EXEC} accounting balance -r ${NEOFS_ENDPOINT} --wallet ${WIF} ... shell=True Should Be Equal As Numbers ${OUTPUT.stdout} ${DEPOSIT_AMOUNT} @@ -52,12 +52,6 @@ CLI Accounting Balance Test ... 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_EXEC} accounting balance -r ${NEOFS_ENDPOINT} --binary-key ${KEY_PATH} - ... shell=True - Should Be Equal As Numbers ${OUTPUT.stdout} ${DEPOSIT_AMOUNT} - [Teardown] Teardown cli_accounting_balance *** Keywords *** diff --git a/robot/testsuites/integration/cli/netmap/networkinfo_rpc_method.robot b/robot/testsuites/integration/cli/netmap/networkinfo_rpc_method.robot index ee1d1a8..7935a71 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_EXEC} 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} --wallet ${MAINNET_WALLET_WIF} shell=True Should Be Equal As Integers ${RESULT1_S01.rc} 0 - ${RESULT1_S02} Run Process ${NEOFS_CLI_EXEC} 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} --wallet ${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_EXEC} 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} --wallet ${MAINNET_WALLET_WIF} shell=True Should Be Equal As Integers ${RESULT2_S01.rc} 0 - ${RESULT2_S02} Run Process ${NEOFS_CLI_EXEC} 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} --wallet ${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/container/container_session_token.robot b/robot/testsuites/integration/container/container_session_token.robot index 8528438..67cc0d9 100644 --- a/robot/testsuites/integration/container/container_session_token.robot +++ b/robot/testsuites/integration/container/container_session_token.robot @@ -42,7 +42,7 @@ Session Token for Container # Check container owner ######################## - ${CONTAINER_INFO} = Run Process ${NEOFS_CLI_EXEC} container get --cid ${CID} --wif ${GEN_KEY} --rpc-endpoint ${NEOFS_ENDPOINT} shell=True + ${CONTAINER_INFO} = Run Process ${NEOFS_CLI_EXEC} container get --cid ${CID} --wallet ${GEN_KEY} --rpc-endpoint ${NEOFS_ENDPOINT} shell=True ${CID_OWNER_ID_LINE} = Get Line ${CONTAINER_INFO.stdout} 2 @{CID_OWNER_ID} = Split String ${CID_OWNER_ID_LINE} Should Be Equal As Strings ${OWNER} ${CID_OWNER_ID}[2] diff --git a/robot/testsuites/integration/network/netmap_control.robot b/robot/testsuites/integration/network/netmap_control.robot index dde95fe..595424a 100644 --- a/robot/testsuites/integration/network/netmap_control.robot +++ b/robot/testsuites/integration/network/netmap_control.robot @@ -21,33 +21,34 @@ Control Operations with storage nodes ${NODE_NUM} ${NODE} ${WIF} = Get control endpoint with wif ${empty_list} = Create List - ${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 + ${SNAPSHOT} = Run Process ${NEOFS_CLI_EXEC} control netmap-snapshot --endpoint ${NODE} --wallet ${WIF} shell=True + ${HEALTHCHECK} = Run Process ${NEOFS_CLI_EXEC} control healthcheck --endpoint ${NODE} --wallet ${WIF} shell=True Should Be Equal As Integers ${HEALTHCHECK.rc} 0 - Run Process ${NEOFS_CLI_EXEC} control set-status --endpoint ${NODE} --wif ${WIF} --status 'offline' shell=True + Run Process ${NEOFS_CLI_EXEC} control set-status --endpoint ${NODE} --wallet ${WIF} --status 'offline' shell=True Sleep ${MAINNET_BLOCK_TIME} Tick Epoch - ${SNAPSHOT_OFFLINE}= Run Process ${NEOFS_CLI_EXEC} control netmap-snapshot --endpoint ${NODE} --wif ${WIF} shell=True + + ${SNAPSHOT_OFFLINE}= Run Process ${NEOFS_CLI_EXEC} control netmap-snapshot --endpoint ${NODE} --wallet ${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_EXEC} control healthcheck --endpoint ${NODE} --wif ${WIF} shell=True + ${HEALTHCHECK_OFFLINE} = Run Process ${NEOFS_CLI_EXEC} control healthcheck --endpoint ${NODE} --wallet ${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_EXEC} control set-status --endpoint ${NODE} --wif ${WIF} --status 'online' shell=True + Run Process ${NEOFS_CLI_EXEC} control set-status --endpoint ${NODE} --wallet ${WIF} --status 'online' shell=True Sleep ${MAINNET_BLOCK_TIME} Tick Epoch - ${SNAPSHOT_ONLINE} = Run Process ${NEOFS_CLI_EXEC} control netmap-snapshot --endpoint ${NODE} --wif ${WIF} shell=True + ${SNAPSHOT_ONLINE} = Run Process ${NEOFS_CLI_EXEC} control netmap-snapshot --endpoint ${NODE} --wallet ${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_EXEC} control healthcheck --endpoint ${NODE} --wif ${WIF} shell=True + ${HEALTHCHECK_ONLINE} = Run Process ${NEOFS_CLI_EXEC} control healthcheck --endpoint ${NODE} --wallet ${WIF} shell=True Should Be Equal As Integers ${HEALTHCHECK_ONLINE.rc} 0 Should Be Equal ${HEALTHCHECK.stdout} ${HEALTHCHECK_ONLINE.stdout}