"Neofs Deposit" moved to keywords repo and changed its signature
Signed-off-by: anastasia prasolova <anastasia@nspcc.ru>
This commit is contained in:
parent
e0b0cbf823
commit
8d50305982
37 changed files with 252 additions and 354 deletions
|
@ -47,21 +47,6 @@ def withdraw_mainnet_gas(wallet: str, address: str, scripthash: str, amount: int
|
||||||
return tx
|
return tx
|
||||||
|
|
||||||
|
|
||||||
@keyword('NeoFS Deposit')
|
|
||||||
def neofs_deposit(wallet_file: str, address: str, scripthash: str, amount: int, wallet_pass:str=''):
|
|
||||||
|
|
||||||
# 1) Get NeoFS contract address.
|
|
||||||
deposit_addr = converters.contract_hash_to_address(NEOFS_CONTRACT)
|
|
||||||
logger.info(f"deposit_addr: {deposit_addr}")
|
|
||||||
|
|
||||||
# 2) Transfer GAS to the NeoFS contract address.
|
|
||||||
out = wallet.new_nep17_transfer(address, deposit_addr, amount, 'GAS', wallet_file, '', NEO_MAINNET_ENDPOINT)
|
|
||||||
|
|
||||||
if len(out) != 64:
|
|
||||||
raise Exception("Can not get Tx.")
|
|
||||||
|
|
||||||
return out
|
|
||||||
|
|
||||||
@keyword('Transaction accepted in block')
|
@keyword('Transaction accepted in block')
|
||||||
def transaction_accepted_in_block(tx_id):
|
def transaction_accepted_in_block(tx_id):
|
||||||
"""
|
"""
|
||||||
|
|
39
robot/resources/lib/payment_operations.robot
Normal file
39
robot/resources/lib/payment_operations.robot
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
*** Settings ***
|
||||||
|
Variables ../../variables/common.py
|
||||||
|
|
||||||
|
Library wallet_keywords.py
|
||||||
|
Library rpc_call_keywords.py
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${TRANSFER_AMOUNT} = ${30}
|
||||||
|
${DEPOSIT_AMOUNT} = ${25}
|
||||||
|
|
||||||
|
|
||||||
|
*** Keywords ***
|
||||||
|
|
||||||
|
Generate Keys
|
||||||
|
${WALLET} ${ADDR} ${USER_KEY_GEN} = Init Wallet with Address ${TEMP_DIR}
|
||||||
|
${WALLET_OTH} ${ADDR_OTH} ${OTHER_KEY_GEN} = Init Wallet with Address ${TEMP_DIR}
|
||||||
|
|
||||||
|
Set Global Variable ${USER_KEY} ${USER_KEY_GEN}
|
||||||
|
Set Global Variable ${OTHER_KEY} ${OTHER_KEY_GEN}
|
||||||
|
Set Global Variable ${SYSTEM_KEY_IR} ${NEOFS_IR_WIF}
|
||||||
|
Set Global Variable ${SYSTEM_KEY_SN} ${NEOFS_SN_WIF}
|
||||||
|
|
||||||
|
Payment Operations ${ADDR} ${USER_KEY}
|
||||||
|
Payment Operations ${ADDR_OTH} ${OTHER_KEY}
|
||||||
|
|
||||||
|
|
||||||
|
Payment Operations
|
||||||
|
[Arguments] ${ADDR} ${WIF}
|
||||||
|
|
||||||
|
${TX} = Transfer Mainnet Gas ${MAINNET_WALLET_WIF} ${ADDR} ${TRANSFER_AMOUNT}
|
||||||
|
Wait Until Keyword Succeeds ${MAINNET_TIMEOUT} ${MAINNET_BLOCK_TIME}
|
||||||
|
... Transaction accepted in block ${TX}
|
||||||
|
|
||||||
|
${MAINNET_BALANCE} = Get Mainnet Balance ${ADDR}
|
||||||
|
Should Be Equal As Numbers ${MAINNET_BALANCE} ${TRANSFER_AMOUNT}
|
||||||
|
|
||||||
|
${TX_DEPOSIT} = NeoFS Deposit ${WIF} ${DEPOSIT_AMOUNT}
|
||||||
|
Wait Until Keyword Succeeds ${MAINNET_TIMEOUT} ${MAINNET_BLOCK_TIME}
|
||||||
|
... Transaction accepted in block ${TX_DEPOSIT}
|
|
@ -5,6 +5,7 @@ Library ../${RESOURCES}/payment_neogo.py
|
||||||
Library ../${RESOURCES}/utility_keywords.py
|
Library ../${RESOURCES}/utility_keywords.py
|
||||||
|
|
||||||
Resource common_steps_acl_basic.robot
|
Resource common_steps_acl_basic.robot
|
||||||
|
Resource ../${RESOURCES}/payment_operations.robot
|
||||||
|
|
||||||
|
|
||||||
*** Test cases ***
|
*** Test cases ***
|
||||||
|
|
|
@ -6,6 +6,7 @@ Library ../${RESOURCES}/payment_neogo.py
|
||||||
Library ../${RESOURCES}/utility_keywords.py
|
Library ../${RESOURCES}/utility_keywords.py
|
||||||
|
|
||||||
Resource common_steps_acl_basic.robot
|
Resource common_steps_acl_basic.robot
|
||||||
|
Resource ../${RESOURCES}/payment_operations.robot
|
||||||
|
|
||||||
|
|
||||||
*** Test cases ***
|
*** Test cases ***
|
||||||
|
|
|
@ -5,6 +5,7 @@ Library ../${RESOURCES}/payment_neogo.py
|
||||||
Library ../${RESOURCES}/utility_keywords.py
|
Library ../${RESOURCES}/utility_keywords.py
|
||||||
|
|
||||||
Resource common_steps_acl_basic.robot
|
Resource common_steps_acl_basic.robot
|
||||||
|
Resource ../${RESOURCES}/payment_operations.robot
|
||||||
|
|
||||||
|
|
||||||
*** Test cases ***
|
*** Test cases ***
|
||||||
|
|
|
@ -6,6 +6,7 @@ Library ../${RESOURCES}/payment_neogo.py
|
||||||
Library ../${RESOURCES}/utility_keywords.py
|
Library ../${RESOURCES}/utility_keywords.py
|
||||||
|
|
||||||
Resource common_steps_acl_basic.robot
|
Resource common_steps_acl_basic.robot
|
||||||
|
Resource ../${RESOURCES}/payment_operations.robot
|
||||||
|
|
||||||
|
|
||||||
*** Test cases ***
|
*** Test cases ***
|
||||||
|
|
|
@ -5,6 +5,7 @@ Library ../${RESOURCES}/payment_neogo.py
|
||||||
Library ../${RESOURCES}/utility_keywords.py
|
Library ../${RESOURCES}/utility_keywords.py
|
||||||
|
|
||||||
Resource common_steps_acl_basic.robot
|
Resource common_steps_acl_basic.robot
|
||||||
|
Resource ../${RESOURCES}/payment_operations.robot
|
||||||
|
|
||||||
|
|
||||||
*** Test cases ***
|
*** Test cases ***
|
||||||
|
|
|
@ -6,6 +6,7 @@ Library ../${RESOURCES}/payment_neogo.py
|
||||||
Library ../${RESOURCES}/utility_keywords.py
|
Library ../${RESOURCES}/utility_keywords.py
|
||||||
|
|
||||||
Resource common_steps_acl_basic.robot
|
Resource common_steps_acl_basic.robot
|
||||||
|
Resource ../${RESOURCES}/payment_operations.robot
|
||||||
|
|
||||||
|
|
||||||
*** Test cases ***
|
*** Test cases ***
|
||||||
|
|
|
@ -3,9 +3,10 @@ Variables ../../../variables/common.py
|
||||||
Library ../${RESOURCES}/neofs.py
|
Library ../${RESOURCES}/neofs.py
|
||||||
Library ../${RESOURCES}/payment_neogo.py
|
Library ../${RESOURCES}/payment_neogo.py
|
||||||
Library ../${RESOURCES}/utility_keywords.py
|
Library ../${RESOURCES}/utility_keywords.py
|
||||||
|
|
||||||
Library Collections
|
Library Collections
|
||||||
|
|
||||||
Resource common_steps_acl_bearer.robot
|
Resource common_steps_acl_bearer.robot
|
||||||
|
Resource ../${RESOURCES}/payment_operations.robot
|
||||||
|
|
||||||
|
|
||||||
*** Test cases ***
|
*** Test cases ***
|
||||||
|
@ -17,6 +18,7 @@ BearerToken Operations
|
||||||
[Setup] Create Temporary Directory
|
[Setup] Create Temporary Directory
|
||||||
|
|
||||||
Generate Keys
|
Generate Keys
|
||||||
|
Generate eACL Keys
|
||||||
Prepare eACL Role rules
|
Prepare eACL Role rules
|
||||||
|
|
||||||
Log Check Bearer token with simple object
|
Log Check Bearer token with simple object
|
||||||
|
|
|
@ -6,6 +6,7 @@ Library ../${RESOURCES}/utility_keywords.py
|
||||||
|
|
||||||
Library Collections
|
Library Collections
|
||||||
Resource common_steps_acl_bearer.robot
|
Resource common_steps_acl_bearer.robot
|
||||||
|
Resource ../${RESOURCES}/payment_operations.robot
|
||||||
|
|
||||||
|
|
||||||
*** Test cases ***
|
*** Test cases ***
|
||||||
|
@ -17,6 +18,7 @@ BearerToken Operations
|
||||||
[Setup] Create Temporary Directory
|
[Setup] Create Temporary Directory
|
||||||
|
|
||||||
Generate Keys
|
Generate Keys
|
||||||
|
Generate eACL Keys
|
||||||
Prepare eACL Role rules
|
Prepare eACL Role rules
|
||||||
|
|
||||||
Log Check Bearer token with simple object
|
Log Check Bearer token with simple object
|
||||||
|
|
|
@ -6,6 +6,7 @@ Library ../${RESOURCES}/utility_keywords.py
|
||||||
|
|
||||||
Library Collections
|
Library Collections
|
||||||
Resource common_steps_acl_bearer.robot
|
Resource common_steps_acl_bearer.robot
|
||||||
|
Resource ../${RESOURCES}/payment_operations.robot
|
||||||
|
|
||||||
*** Test cases ***
|
*** Test cases ***
|
||||||
BearerToken Operations for Сompound Operations
|
BearerToken Operations for Сompound Operations
|
||||||
|
@ -16,6 +17,7 @@ BearerToken Operations for Сompound Operations
|
||||||
[Setup] Create Temporary Directory
|
[Setup] Create Temporary Directory
|
||||||
|
|
||||||
Generate Keys
|
Generate Keys
|
||||||
|
Generate eACL Keys
|
||||||
Prepare eACL Role rules
|
Prepare eACL Role rules
|
||||||
|
|
||||||
Log Check Bearer token with simple object
|
Log Check Bearer token with simple object
|
||||||
|
|
|
@ -6,6 +6,7 @@ Library ../${RESOURCES}/utility_keywords.py
|
||||||
|
|
||||||
Library Collections
|
Library Collections
|
||||||
Resource common_steps_acl_bearer.robot
|
Resource common_steps_acl_bearer.robot
|
||||||
|
Resource ../${RESOURCES}/payment_operations.robot
|
||||||
|
|
||||||
|
|
||||||
*** Test cases ***
|
*** Test cases ***
|
||||||
|
@ -17,6 +18,7 @@ BearerToken Operations with Filter OID Equal
|
||||||
[Setup] Create Temporary Directory
|
[Setup] Create Temporary Directory
|
||||||
|
|
||||||
Generate Keys
|
Generate Keys
|
||||||
|
Generate eACL Keys
|
||||||
Prepare eACL Role rules
|
Prepare eACL Role rules
|
||||||
|
|
||||||
Log Check Bearer token with simple object
|
Log Check Bearer token with simple object
|
||||||
|
|
|
@ -6,6 +6,7 @@ Library ../${RESOURCES}/utility_keywords.py
|
||||||
|
|
||||||
Library Collections
|
Library Collections
|
||||||
Resource common_steps_acl_bearer.robot
|
Resource common_steps_acl_bearer.robot
|
||||||
|
Resource ../${RESOURCES}/payment_operations.robot
|
||||||
|
|
||||||
|
|
||||||
*** Test cases ***
|
*** Test cases ***
|
||||||
|
@ -17,6 +18,7 @@ BearerToken Operations with Filter OID NotEqual
|
||||||
[Setup] Create Temporary Directory
|
[Setup] Create Temporary Directory
|
||||||
|
|
||||||
Generate Keys
|
Generate Keys
|
||||||
|
Generate eACL Keys
|
||||||
Prepare eACL Role rules
|
Prepare eACL Role rules
|
||||||
|
|
||||||
Log Check Bearer token with simple object
|
Log Check Bearer token with simple object
|
||||||
|
|
|
@ -6,6 +6,7 @@ Library ../${RESOURCES}/utility_keywords.py
|
||||||
|
|
||||||
Library Collections
|
Library Collections
|
||||||
Resource common_steps_acl_bearer.robot
|
Resource common_steps_acl_bearer.robot
|
||||||
|
Resource ../${RESOURCES}/payment_operations.robot
|
||||||
|
|
||||||
*** Test cases ***
|
*** Test cases ***
|
||||||
BearerToken Operations with Filter UserHeader Equal
|
BearerToken Operations with Filter UserHeader Equal
|
||||||
|
@ -16,6 +17,7 @@ BearerToken Operations with Filter UserHeader Equal
|
||||||
[Setup] Create Temporary Directory
|
[Setup] Create Temporary Directory
|
||||||
|
|
||||||
Generate Keys
|
Generate Keys
|
||||||
|
Generate eACL Keys
|
||||||
Prepare eACL Role rules
|
Prepare eACL Role rules
|
||||||
|
|
||||||
Log Check Bearer token with simple object
|
Log Check Bearer token with simple object
|
||||||
|
|
|
@ -6,6 +6,7 @@ Library ../${RESOURCES}/utility_keywords.py
|
||||||
|
|
||||||
Library Collections
|
Library Collections
|
||||||
Resource common_steps_acl_bearer.robot
|
Resource common_steps_acl_bearer.robot
|
||||||
|
Resource ../${RESOURCES}/payment_operations.robot
|
||||||
|
|
||||||
*** Test cases ***
|
*** Test cases ***
|
||||||
BearerToken Operations Filter UserHeader NotEqual
|
BearerToken Operations Filter UserHeader NotEqual
|
||||||
|
@ -16,6 +17,7 @@ BearerToken Operations Filter UserHeader NotEqual
|
||||||
[Setup] Create Temporary Directory
|
[Setup] Create Temporary Directory
|
||||||
|
|
||||||
Generate Keys
|
Generate Keys
|
||||||
|
Generate eACL Keys
|
||||||
Prepare eACL Role rules
|
Prepare eACL Role rules
|
||||||
|
|
||||||
Log Check Bearer token with simple object
|
Log Check Bearer token with simple object
|
||||||
|
|
|
@ -7,6 +7,7 @@ Library ../${RESOURCES}/utility_keywords.py
|
||||||
|
|
||||||
Library Collections
|
Library Collections
|
||||||
Resource common_steps_acl_bearer.robot
|
Resource common_steps_acl_bearer.robot
|
||||||
|
Resource ../${RESOURCES}/payment_operations.robot
|
||||||
|
|
||||||
*** Test cases ***
|
*** Test cases ***
|
||||||
BearerToken Operations for Inaccessible Container
|
BearerToken Operations for Inaccessible Container
|
||||||
|
@ -17,6 +18,7 @@ BearerToken Operations for Inaccessible Container
|
||||||
[Setup] Create Temporary Directory
|
[Setup] Create Temporary Directory
|
||||||
|
|
||||||
Generate Keys
|
Generate Keys
|
||||||
|
Generate eACL Keys
|
||||||
Prepare eACL Role rules
|
Prepare eACL Role rules
|
||||||
|
|
||||||
Log Check Bearer token with simple object
|
Log Check Bearer token with simple object
|
||||||
|
|
|
@ -6,6 +6,7 @@ Library ../${RESOURCES}/payment_neogo.py
|
||||||
Library ../${RESOURCES}/utility_keywords.py
|
Library ../${RESOURCES}/utility_keywords.py
|
||||||
|
|
||||||
Resource common_steps_acl_bearer.robot
|
Resource common_steps_acl_bearer.robot
|
||||||
|
Resource ../${RESOURCES}/payment_operations.robot
|
||||||
|
|
||||||
*** Test cases ***
|
*** Test cases ***
|
||||||
BearerToken Operations
|
BearerToken Operations
|
||||||
|
@ -16,6 +17,7 @@ BearerToken Operations
|
||||||
[Setup] Create Temporary Directory
|
[Setup] Create Temporary Directory
|
||||||
|
|
||||||
Generate Keys
|
Generate Keys
|
||||||
|
Generate eACL Keys
|
||||||
Prepare eACL Role rules
|
Prepare eACL Role rules
|
||||||
|
|
||||||
Log Check Bearer token with simple object
|
Log Check Bearer token with simple object
|
||||||
|
|
|
@ -6,6 +6,7 @@ Library ../${RESOURCES}/utility_keywords.py
|
||||||
|
|
||||||
Library Collections
|
Library Collections
|
||||||
Resource common_steps_acl_bearer.robot
|
Resource common_steps_acl_bearer.robot
|
||||||
|
Resource ../${RESOURCES}/payment_operations.robot
|
||||||
|
|
||||||
|
|
||||||
*** Test cases ***
|
*** Test cases ***
|
||||||
|
@ -17,6 +18,7 @@ BearerToken Operations with Filter Requst Equal
|
||||||
[Setup] Create Temporary Directory
|
[Setup] Create Temporary Directory
|
||||||
|
|
||||||
Generate Keys
|
Generate Keys
|
||||||
|
Generate eACL Keys
|
||||||
Prepare eACL Role rules
|
Prepare eACL Role rules
|
||||||
|
|
||||||
Log Check Bearer token with simple object
|
Log Check Bearer token with simple object
|
||||||
|
|
|
@ -6,6 +6,7 @@ Library ../${RESOURCES}/utility_keywords.py
|
||||||
|
|
||||||
Library Collections
|
Library Collections
|
||||||
Resource common_steps_acl_bearer.robot
|
Resource common_steps_acl_bearer.robot
|
||||||
|
Resource ../${RESOURCES}/payment_operations.robot
|
||||||
|
|
||||||
|
|
||||||
*** Test cases ***
|
*** Test cases ***
|
||||||
|
@ -17,6 +18,7 @@ BearerToken Operations with Filter Requst NotEqual
|
||||||
[Setup] Create Temporary Directory
|
[Setup] Create Temporary Directory
|
||||||
|
|
||||||
Generate Keys
|
Generate Keys
|
||||||
|
Generate eACL Keys
|
||||||
Prepare eACL Role rules
|
Prepare eACL Role rules
|
||||||
|
|
||||||
Log Check Bearer token with simple object
|
Log Check Bearer token with simple object
|
||||||
|
|
|
@ -6,6 +6,7 @@ Library ../${RESOURCES}/payment_neogo.py
|
||||||
Library ../${RESOURCES}/utility_keywords.py
|
Library ../${RESOURCES}/utility_keywords.py
|
||||||
|
|
||||||
Resource common_steps_acl_extended.robot
|
Resource common_steps_acl_extended.robot
|
||||||
|
Resource ../${RESOURCES}/payment_operations.robot
|
||||||
|
|
||||||
*** Test cases ***
|
*** Test cases ***
|
||||||
Extended ACL Operations
|
Extended ACL Operations
|
||||||
|
@ -16,6 +17,7 @@ Extended ACL Operations
|
||||||
[Setup] Create Temporary Directory
|
[Setup] Create Temporary Directory
|
||||||
|
|
||||||
Generate Keys
|
Generate Keys
|
||||||
|
Generate eACL Keys
|
||||||
Prepare eACL Role rules
|
Prepare eACL Role rules
|
||||||
|
|
||||||
Log Check extended ACL with simple object
|
Log Check extended ACL with simple object
|
||||||
|
|
|
@ -6,6 +6,7 @@ Library ../${RESOURCES}/payment_neogo.py
|
||||||
Library ../${RESOURCES}/utility_keywords.py
|
Library ../${RESOURCES}/utility_keywords.py
|
||||||
|
|
||||||
Resource common_steps_acl_extended.robot
|
Resource common_steps_acl_extended.robot
|
||||||
|
Resource ../${RESOURCES}/payment_operations.robot
|
||||||
|
|
||||||
*** Test cases ***
|
*** Test cases ***
|
||||||
Extended ACL Operations
|
Extended ACL Operations
|
||||||
|
@ -16,6 +17,7 @@ Extended ACL Operations
|
||||||
[Setup] Create Temporary Directory
|
[Setup] Create Temporary Directory
|
||||||
|
|
||||||
Generate Keys
|
Generate Keys
|
||||||
|
Generate eACL Keys
|
||||||
Prepare eACL Role rules
|
Prepare eACL Role rules
|
||||||
|
|
||||||
Log Check extended ACL with simple object
|
Log Check extended ACL with simple object
|
||||||
|
|
|
@ -6,6 +6,7 @@ Library ../${RESOURCES}/payment_neogo.py
|
||||||
Library ../${RESOURCES}/utility_keywords.py
|
Library ../${RESOURCES}/utility_keywords.py
|
||||||
|
|
||||||
Resource common_steps_acl_extended.robot
|
Resource common_steps_acl_extended.robot
|
||||||
|
Resource ../${RESOURCES}/payment_operations.robot
|
||||||
|
|
||||||
*** Test cases ***
|
*** Test cases ***
|
||||||
Extended ACL Operations
|
Extended ACL Operations
|
||||||
|
@ -16,6 +17,7 @@ Extended ACL Operations
|
||||||
[Setup] Create Temporary Directory
|
[Setup] Create Temporary Directory
|
||||||
|
|
||||||
Generate Keys
|
Generate Keys
|
||||||
|
Generate eACL Keys
|
||||||
Prepare eACL Role rules
|
Prepare eACL Role rules
|
||||||
|
|
||||||
Log Check extended ACL with simple object
|
Log Check extended ACL with simple object
|
||||||
|
|
|
@ -6,6 +6,7 @@ Library ../${RESOURCES}/payment_neogo.py
|
||||||
Library ../${RESOURCES}/utility_keywords.py
|
Library ../${RESOURCES}/utility_keywords.py
|
||||||
|
|
||||||
Resource common_steps_acl_extended.robot
|
Resource common_steps_acl_extended.robot
|
||||||
|
Resource ../${RESOURCES}/payment_operations.robot
|
||||||
|
|
||||||
*** Test cases ***
|
*** Test cases ***
|
||||||
Extended ACL Operations
|
Extended ACL Operations
|
||||||
|
@ -16,6 +17,7 @@ Extended ACL Operations
|
||||||
[Setup] Create Temporary Directory
|
[Setup] Create Temporary Directory
|
||||||
|
|
||||||
Generate Keys
|
Generate Keys
|
||||||
|
Generate eACL Keys
|
||||||
Prepare eACL Role rules
|
Prepare eACL Role rules
|
||||||
|
|
||||||
Log Check extended ACL with simple object
|
Log Check extended ACL with simple object
|
||||||
|
|
|
@ -6,6 +6,7 @@ Library ../${RESOURCES}/payment_neogo.py
|
||||||
Library ../${RESOURCES}/utility_keywords.py
|
Library ../${RESOURCES}/utility_keywords.py
|
||||||
|
|
||||||
Resource common_steps_acl_extended.robot
|
Resource common_steps_acl_extended.robot
|
||||||
|
Resource ../${RESOURCES}/payment_operations.robot
|
||||||
|
|
||||||
|
|
||||||
*** Test cases ***
|
*** Test cases ***
|
||||||
|
@ -17,6 +18,7 @@ Extended ACL Operations
|
||||||
[Setup] Create Temporary Directory
|
[Setup] Create Temporary Directory
|
||||||
|
|
||||||
Generate Keys
|
Generate Keys
|
||||||
|
Generate eACL Keys
|
||||||
Prepare eACL Role rules
|
Prepare eACL Role rules
|
||||||
|
|
||||||
Log Check extended ACL with simple object
|
Log Check extended ACL with simple object
|
||||||
|
|
|
@ -6,6 +6,7 @@ Library ../${RESOURCES}/payment_neogo.py
|
||||||
Library ../${RESOURCES}/utility_keywords.py
|
Library ../${RESOURCES}/utility_keywords.py
|
||||||
|
|
||||||
Resource common_steps_acl_extended.robot
|
Resource common_steps_acl_extended.robot
|
||||||
|
Resource ../${RESOURCES}/payment_operations.robot
|
||||||
|
|
||||||
*** Test cases ***
|
*** Test cases ***
|
||||||
Extended ACL Operations
|
Extended ACL Operations
|
||||||
|
@ -16,6 +17,7 @@ Extended ACL Operations
|
||||||
[Setup] Create Temporary Directory
|
[Setup] Create Temporary Directory
|
||||||
|
|
||||||
Generate Keys
|
Generate Keys
|
||||||
|
Generate eACL Keys
|
||||||
Prepare eACL Role rules
|
Prepare eACL Role rules
|
||||||
|
|
||||||
Log Check extended ACL with simple object
|
Log Check extended ACL with simple object
|
||||||
|
|
|
@ -1,52 +1,12 @@
|
||||||
*** Settings ***
|
*** Settings ***
|
||||||
Variables ../../../variables/common.py
|
Variables ../../../variables/common.py
|
||||||
|
|
||||||
Library ${KEYWORDS}/wallet_keywords.py
|
|
||||||
Library ${KEYWORDS}/rpc_call_keywords.py
|
|
||||||
|
|
||||||
*** Variables ***
|
*** Variables ***
|
||||||
${RULE_FOR_ALL} = REP 2 IN X CBF 1 SELECT 4 FROM * AS X
|
${RULE_FOR_ALL} = REP 2 IN X CBF 1 SELECT 4 FROM * AS X
|
||||||
${TRANSFER_AMOUNT} = ${3}
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
*** Keywords ***
|
||||||
|
|
||||||
Generate Keys
|
|
||||||
${WALLET} ${ADDR} ${USER_KEY_GEN} = Init Wallet with Address ${TEMP_DIR}
|
|
||||||
${WALLET_OTH} ${ADDR_OTH} ${OTHER_KEY_GEN} = Init Wallet with Address ${TEMP_DIR}
|
|
||||||
|
|
||||||
${SYSTEM_KEY_GEN} = Set Variable ${NEOFS_IR_WIF}
|
|
||||||
${SYSTEM_KEY_GEN_SN} = Set Variable ${NEOFS_SN_WIF}
|
|
||||||
|
|
||||||
Set Global Variable ${USER_KEY} ${USER_KEY_GEN}
|
|
||||||
Set Global Variable ${OTHER_KEY} ${OTHER_KEY_GEN}
|
|
||||||
Set Global Variable ${SYSTEM_KEY_IR} ${SYSTEM_KEY_GEN}
|
|
||||||
Set Global Variable ${SYSTEM_KEY_SN} ${SYSTEM_KEY_GEN_SN}
|
|
||||||
|
|
||||||
Payment Operations ${WALLET} ${ADDR} ${USER_KEY}
|
|
||||||
Payment Operations ${WALLET_OTH} ${ADDR_OTH} ${OTHER_KEY}
|
|
||||||
|
|
||||||
# Basic ACL manual page: https://neospcc.atlassian.net/wiki/spaces/NEOF/pages/362348545/NeoFS+ACL
|
|
||||||
# TODO: X - Sticky bit validation on public container
|
|
||||||
|
|
||||||
|
|
||||||
Payment Operations
|
|
||||||
[Arguments] ${WALLET} ${ADDR} ${KEY}
|
|
||||||
|
|
||||||
${TX} = Transfer Mainnet Gas ${MAINNET_WALLET_WIF} ${ADDR} 3
|
|
||||||
Wait Until Keyword Succeeds 1 min 15 sec
|
|
||||||
... Transaction accepted in block ${TX}
|
|
||||||
|
|
||||||
${MAINNET_BALANCE} = Get Mainnet Balance ${ADDR}
|
|
||||||
Should Be Equal As Numbers ${MAINNET_BALANCE} ${TRANSFER_AMOUNT}
|
|
||||||
|
|
||||||
${SCRIPT_HASH} = Get ScriptHash ${KEY}
|
|
||||||
|
|
||||||
${TX_DEPOSIT} = NeoFS Deposit ${WALLET} ${ADDR} ${SCRIPT_HASH} 2
|
|
||||||
Wait Until Keyword Succeeds 1 min 15 sec
|
|
||||||
... Transaction accepted in block ${TX_DEPOSIT}
|
|
||||||
Get Transaction ${TX_DEPOSIT}
|
|
||||||
|
|
||||||
Create Containers
|
Create Containers
|
||||||
Log Create Private Container
|
Log Create Private Container
|
||||||
${PRIV_CID_GEN} = Create container ${USER_KEY} 0x18888888 ${RULE_FOR_ALL}
|
${PRIV_CID_GEN} = Create container ${USER_KEY} 0x18888888 ${RULE_FOR_ALL}
|
||||||
|
|
|
@ -1,56 +1,19 @@
|
||||||
*** Settings ***
|
*** Settings ***
|
||||||
Variables ../../../variables/common.py
|
Variables ../../../variables/common.py
|
||||||
|
|
||||||
Library ${KEYWORDS}/wallet_keywords.py
|
|
||||||
Library ${KEYWORDS}/rpc_call_keywords.py
|
|
||||||
|
|
||||||
*** Variables ***
|
*** Variables ***
|
||||||
${FILE_USR_HEADER} = key1=1,key2=abc
|
${FILE_USR_HEADER} = key1=1,key2=abc
|
||||||
${FILE_USR_HEADER_DEL} = key1=del,key2=del
|
${FILE_USR_HEADER_DEL} = key1=del,key2=del
|
||||||
${FILE_OTH_HEADER} = key1=oth,key2=oth
|
${FILE_OTH_HEADER} = key1=oth,key2=oth
|
||||||
${RULE_FOR_ALL} = REP 2 IN X CBF 1 SELECT 4 FROM * AS X
|
${RULE_FOR_ALL} = REP 2 IN X CBF 1 SELECT 4 FROM * AS X
|
||||||
${TRANSFER_AMOUNT} = ${3}
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
*** Keywords ***
|
||||||
|
|
||||||
Generate Keys
|
Generate eACL Keys
|
||||||
# Generate new wallets
|
|
||||||
${WALLET} ${ADDR} ${USER_KEY_GEN} = Init Wallet with Address ${TEMP_DIR}
|
|
||||||
${WALLET_OTH} ${ADDR_OTH} ${OTHER_KEY_GEN} = Init Wallet with Address ${TEMP_DIR}
|
|
||||||
|
|
||||||
# Get pre-defined keys
|
|
||||||
${EACL_KEY_GEN} = Form WIF from String 782676b81a35c5f07325ec523e8521ee4946b6e5d4c6cd652dd0c3ba51ce03de
|
${EACL_KEY_GEN} = Form WIF from String 782676b81a35c5f07325ec523e8521ee4946b6e5d4c6cd652dd0c3ba51ce03de
|
||||||
${SYSTEM_KEY_GEN} = Set Variable ${NEOFS_IR_WIF}
|
|
||||||
${SYSTEM_KEY_GEN_SN} = Set Variable ${NEOFS_SN_WIF}
|
|
||||||
|
|
||||||
# Set global variables for keys for each role
|
|
||||||
Set Global Variable ${USER_KEY} ${USER_KEY_GEN}
|
|
||||||
Set Global Variable ${OTHER_KEY} ${OTHER_KEY_GEN}
|
|
||||||
Set Global Variable ${SYSTEM_KEY} ${SYSTEM_KEY_GEN}
|
|
||||||
Set Global Variable ${SYSTEM_KEY_SN} ${SYSTEM_KEY_GEN_SN}
|
|
||||||
Set Global Variable ${EACL_KEY} ${EACL_KEY_GEN}
|
Set Global Variable ${EACL_KEY} ${EACL_KEY_GEN}
|
||||||
|
Set Global Variable ${SYSTEM_KEY} ${NEOFS_IR_WIF}
|
||||||
Payment Operations ${WALLET} ${ADDR} ${USER_KEY}
|
|
||||||
Payment Operations ${WALLET_OTH} ${ADDR_OTH} ${OTHER_KEY}
|
|
||||||
|
|
||||||
|
|
||||||
Payment Operations
|
|
||||||
[Arguments] ${WALLET} ${ADDR} ${KEY}
|
|
||||||
|
|
||||||
${TX} = Transfer Mainnet Gas ${MAINNET_WALLET_WIF} ${ADDR} ${TRANSFER_AMOUNT}
|
|
||||||
Wait Until Keyword Succeeds 1 min 15 sec
|
|
||||||
... Transaction accepted in block ${TX}
|
|
||||||
|
|
||||||
${MAINNET_BALANCE} = Get Mainnet Balance ${ADDR}
|
|
||||||
Should Be Equal As Numbers ${MAINNET_BALANCE} ${TRANSFER_AMOUNT}
|
|
||||||
|
|
||||||
${SCRIPT_HASH} = Get ScriptHash ${KEY}
|
|
||||||
|
|
||||||
${TX_DEPOSIT} = NeoFS Deposit ${WALLET} ${ADDR} ${SCRIPT_HASH} 2
|
|
||||||
Wait Until Keyword Succeeds 1 min 15 sec
|
|
||||||
... Transaction accepted in block ${TX_DEPOSIT}
|
|
||||||
Get Transaction ${TX_DEPOSIT}
|
|
||||||
|
|
||||||
|
|
||||||
Create Container Public
|
Create Container Public
|
||||||
|
|
|
@ -1,55 +1,19 @@
|
||||||
*** Settings ***
|
*** Settings ***
|
||||||
Variables ../../../variables/common.py
|
Variables ../../../variables/common.py
|
||||||
|
|
||||||
Library ${KEYWORDS}/wallet_keywords.py
|
|
||||||
Library ${KEYWORDS}/rpc_call_keywords.py
|
|
||||||
|
|
||||||
*** Variables ***
|
*** Variables ***
|
||||||
${FILE_USR_HEADER} = key1=1,key2=abc
|
${FILE_USR_HEADER} = key1=1,key2=abc
|
||||||
${FILE_USR_HEADER_DEL} = key1=del,key2=del
|
${FILE_USR_HEADER_DEL} = key1=del,key2=del
|
||||||
${FILE_OTH_HEADER} = key1=oth,key2=oth
|
${FILE_OTH_HEADER} = key1=oth,key2=oth
|
||||||
${RULE_FOR_ALL} = REP 2 IN X CBF 1 SELECT 4 FROM * AS X
|
${RULE_FOR_ALL} = REP 2 IN X CBF 1 SELECT 4 FROM * AS X
|
||||||
${TRANSFER_AMOUNT} = ${3}
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
*** Keywords ***
|
||||||
Generate Keys
|
|
||||||
${WALLET} ${ADDR} ${USER_KEY_GEN} = Init Wallet with Address ${TEMP_DIR}
|
|
||||||
${WALLET_OTH} ${ADDR_OTH} ${OTHER_KEY_GEN} = Init Wallet with Address ${TEMP_DIR}
|
|
||||||
|
|
||||||
|
|
||||||
|
Generate eACL Keys
|
||||||
${EACL_KEY_GEN} = Form WIF from String 782676b81a35c5f07325ec523e8521ee4946b6e5d4c6cd652dd0c3ba51ce03de
|
${EACL_KEY_GEN} = Form WIF from String 782676b81a35c5f07325ec523e8521ee4946b6e5d4c6cd652dd0c3ba51ce03de
|
||||||
${SYSTEM_KEY_GEN} = Set Variable ${NEOFS_IR_WIF}
|
|
||||||
${SYSTEM_KEY_GEN_SN} = Set Variable ${NEOFS_SN_WIF}
|
|
||||||
|
|
||||||
Set Global Variable ${USER_KEY} ${USER_KEY_GEN}
|
|
||||||
Set Global Variable ${OTHER_KEY} ${OTHER_KEY_GEN}
|
|
||||||
Set Global Variable ${SYSTEM_KEY} ${SYSTEM_KEY_GEN}
|
|
||||||
Set Global Variable ${SYSTEM_KEY_SN} ${SYSTEM_KEY_GEN_SN}
|
|
||||||
Set Global Variable ${EACL_KEY} ${EACL_KEY_GEN}
|
Set Global Variable ${EACL_KEY} ${EACL_KEY_GEN}
|
||||||
|
Set Global Variable ${SYSTEM_KEY} ${NEOFS_IR_WIF}
|
||||||
Payment Operations ${WALLET} ${ADDR} ${USER_KEY}
|
|
||||||
Payment Operations ${WALLET_OTH} ${ADDR_OTH} ${OTHER_KEY}
|
|
||||||
|
|
||||||
|
|
||||||
Payment Operations
|
|
||||||
[Arguments] ${WALLET} ${ADDR} ${KEY}
|
|
||||||
|
|
||||||
${TX} = Transfer Mainnet Gas ${MAINNET_WALLET_WIF} ${ADDR} 3
|
|
||||||
|
|
||||||
Wait Until Keyword Succeeds 1 min 15 sec
|
|
||||||
... Transaction accepted in block ${TX}
|
|
||||||
|
|
||||||
${MAINNET_BALANCE} = Get Mainnet Balance ${ADDR}
|
|
||||||
Should Be Equal As Numbers ${MAINNET_BALANCE} ${TRANSFER_AMOUNT}
|
|
||||||
|
|
||||||
${SCRIPT_HASH} = Get ScriptHash ${KEY}
|
|
||||||
|
|
||||||
${TX_DEPOSIT} = NeoFS Deposit ${WALLET} ${ADDR} ${SCRIPT_HASH} 2
|
|
||||||
Wait Until Keyword Succeeds 1 min 15 sec
|
|
||||||
... Transaction accepted in block ${TX_DEPOSIT}
|
|
||||||
Get Transaction ${TX_DEPOSIT}
|
|
||||||
|
|
||||||
|
|
||||||
Create Container Public
|
Create Container Public
|
||||||
Log Create Public Container
|
Log Create Public Container
|
||||||
|
|
|
@ -7,8 +7,7 @@ Library ../${RESOURCES}/utility_keywords.py
|
||||||
Library ${KEYWORDS}/wallet_keywords.py
|
Library ${KEYWORDS}/wallet_keywords.py
|
||||||
Library ${KEYWORDS}/rpc_call_keywords.py
|
Library ${KEYWORDS}/rpc_call_keywords.py
|
||||||
|
|
||||||
*** Variables ***
|
Resource ../${RESOURCES}/payment_operations.robot
|
||||||
${TRANSFER_AMOUNT} = ${11}
|
|
||||||
|
|
||||||
|
|
||||||
*** Test cases ***
|
*** Test cases ***
|
||||||
|
@ -80,24 +79,8 @@ Generate file
|
||||||
Generate Key and Pre-payment
|
Generate Key and Pre-payment
|
||||||
${WALLET} ${ADDR} ${USER_KEY_GEN} = Init Wallet with Address ${TEMP_DIR}
|
${WALLET} ${ADDR} ${USER_KEY_GEN} = Init Wallet with Address ${TEMP_DIR}
|
||||||
Set Global Variable ${PRIV_KEY} ${USER_KEY_GEN}
|
Set Global Variable ${PRIV_KEY} ${USER_KEY_GEN}
|
||||||
Payment Operations ${WALLET} ${ADDR} ${PRIV_KEY}
|
Payment Operations ${ADDR} ${PRIV_KEY}
|
||||||
|
|
||||||
Payment Operations
|
|
||||||
[Arguments] ${WALLET} ${ADDR} ${KEY}
|
|
||||||
|
|
||||||
${TX} = Transfer Mainnet Gas ${MAINNET_WALLET_WIF} ${ADDR} ${TRANSFER_AMOUNT}
|
|
||||||
Wait Until Keyword Succeeds 1 min 15 sec
|
|
||||||
... Transaction accepted in block ${TX}
|
|
||||||
|
|
||||||
${MAINNET_BALANCE} = Get Mainnet Balance ${ADDR}
|
|
||||||
Should Be Equal As Numbers ${MAINNET_BALANCE} ${TRANSFER_AMOUNT}
|
|
||||||
|
|
||||||
${SCRIPT_HASH} = Get ScriptHash ${KEY}
|
|
||||||
|
|
||||||
${TX_DEPOSIT} = NeoFS Deposit ${WALLET} ${ADDR} ${SCRIPT_HASH} 10
|
|
||||||
Wait Until Keyword Succeeds 1 min 15 sec
|
|
||||||
... Transaction accepted in block ${TX_DEPOSIT}
|
|
||||||
Get Transaction ${TX_DEPOSIT}
|
|
||||||
|
|
||||||
Validate Policy
|
Validate Policy
|
||||||
[Arguments] ${POLICY} ${EXPECTED_VAL} @{EXPECTED_LIST}
|
[Arguments] ${POLICY} ${EXPECTED_VAL} @{EXPECTED_LIST}
|
||||||
|
|
|
@ -7,9 +7,10 @@ Library ../${RESOURCES}/utility_keywords.py
|
||||||
Library ${KEYWORDS}/wallet_keywords.py
|
Library ${KEYWORDS}/wallet_keywords.py
|
||||||
Library ${KEYWORDS}/rpc_call_keywords.py
|
Library ${KEYWORDS}/rpc_call_keywords.py
|
||||||
|
|
||||||
|
Resource ../${RESOURCES}/payment_operations.robot
|
||||||
|
|
||||||
*** Variables ***
|
*** Variables ***
|
||||||
${PLACEMENT_RULE} = REP 2 IN X CBF 1 SELECT 4 FROM * AS X
|
${PLACEMENT_RULE} = REP 2 IN X CBF 1 SELECT 4 FROM * AS X
|
||||||
${TRANSFER_AMOUNT} = ${11}
|
|
||||||
|
|
||||||
*** Test cases ***
|
*** Test cases ***
|
||||||
NeoFS Object Replication
|
NeoFS Object Replication
|
||||||
|
@ -19,33 +20,19 @@ NeoFS Object Replication
|
||||||
|
|
||||||
[Setup] Create Temporary Directory
|
[Setup] Create Temporary Directory
|
||||||
|
|
||||||
${WALLET} ${ADDR} ${PRIV_KEY} = Init Wallet with Address ${TEMP_DIR}
|
${WALLET} ${ADDR} ${WIF} = Init Wallet with Address ${TEMP_DIR}
|
||||||
${TX} = Transfer Mainnet Gas ${MAINNET_WALLET_WIF} ${ADDR} ${TRANSFER_AMOUNT}
|
Payment Operations ${ADDR} ${WIF}
|
||||||
Wait Until Keyword Succeeds 1 min 15 sec
|
|
||||||
... Transaction accepted in block ${TX}
|
|
||||||
|
|
||||||
${MAINNET_BALANCE} = Get Mainnet Balance ${ADDR}
|
|
||||||
Should Be Equal As Numbers ${MAINNET_BALANCE} ${TRANSFER_AMOUNT}
|
|
||||||
|
|
||||||
|
|
||||||
${SCRIPT_HASH} = Get ScriptHash ${PRIV_KEY}
|
|
||||||
|
|
||||||
${TX_DEPOSIT} = NeoFS Deposit ${WALLET} ${ADDR} ${SCRIPT_HASH} 10
|
|
||||||
Wait Until Keyword Succeeds 1 min 15 sec
|
|
||||||
... Transaction accepted in block ${TX_DEPOSIT}
|
|
||||||
Get Transaction ${TX_DEPOSIT}
|
|
||||||
|
|
||||||
${CID} = Create container ${PRIV_KEY} ${EMPTY} ${PLACEMENT_RULE}
|
|
||||||
Container Existing ${PRIV_KEY} ${CID}
|
|
||||||
|
|
||||||
|
${CID} = Create container ${WIF} ${EMPTY} ${PLACEMENT_RULE}
|
||||||
|
Container Existing ${WIF} ${CID}
|
||||||
|
|
||||||
${FILE} = Generate file of bytes ${SIMPLE_OBJ_SIZE}
|
${FILE} = Generate file of bytes ${SIMPLE_OBJ_SIZE}
|
||||||
${FILE_HASH} = Get file hash ${FILE}
|
${FILE_HASH} = Get file hash ${FILE}
|
||||||
|
|
||||||
${S_OID} = Put object ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} ${EMPTY}
|
${S_OID} = Put object ${WIF} ${FILE} ${CID} ${EMPTY} ${EMPTY}
|
||||||
Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${S_OID}
|
Validate storage policy for object ${WIF} 2 ${CID} ${S_OID}
|
||||||
|
|
||||||
@{NODES_OBJ} = Get nodes with object ${PRIV_KEY} ${CID} ${S_OID}
|
@{NODES_OBJ} = Get nodes with object ${WIF} ${CID} ${S_OID}
|
||||||
|
|
||||||
${NODES_LOG_TIME} = Get Nodes Log Latest Timestamp
|
${NODES_LOG_TIME} = Get Nodes Log Latest Timestamp
|
||||||
|
|
||||||
|
@ -53,19 +40,15 @@ NeoFS Object Replication
|
||||||
|
|
||||||
${state} ${output}= Run Keyword And Ignore Error
|
${state} ${output}= Run Keyword And Ignore Error
|
||||||
... Wait Until Keyword Succeeds 10 min 2 min
|
... Wait Until Keyword Succeeds 10 min 2 min
|
||||||
... Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${S_OID}
|
... Validate storage policy for object ${WIF} 2 ${CID} ${S_OID}
|
||||||
|
|
||||||
Run Keyword If '${state}'!='PASS' Log Warning: Keyword failed: Validate storage policy for object ${S_OID} {\n}${output} WARN
|
Run Keyword If '${state}'!='PASS' Log Warning: Keyword failed: Validate storage policy for object ${S_OID} {\n}${output} WARN
|
||||||
|
|
||||||
Find in Nodes Log object successfully replicated ${NODES_LOG_TIME}
|
Find in Nodes Log object successfully replicated ${NODES_LOG_TIME}
|
||||||
|
|
||||||
Start nodes @{NODES_OBJ_STOPPED}
|
Start nodes @{NODES_OBJ_STOPPED}
|
||||||
|
|
||||||
# We have 2 or 3 copies. Expected behaviour: after one epoch potential 3rd copy should be removed.
|
# We have 2 or 3 copies. Expected behaviour: after one epoch potential 3rd copy should be removed.
|
||||||
|
|
||||||
Sleep ${NEOFS_EPOCH_TIMEOUT}
|
Sleep ${NEOFS_EPOCH_TIMEOUT}
|
||||||
|
Validate storage policy for object ${WIF} 2 ${CID} ${S_OID}
|
||||||
Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${S_OID}
|
|
||||||
|
|
||||||
[Teardown] Cleanup
|
[Teardown] Cleanup
|
||||||
|
|
||||||
|
|
|
@ -14,25 +14,22 @@ ${DEPOSIT_AMOUNT} = 10
|
||||||
*** Keywords ***
|
*** Keywords ***
|
||||||
|
|
||||||
Payment operations
|
Payment operations
|
||||||
${WALLET} ${ADDR} ${PRIV_KEY} = Init Wallet with Address ${TEMP_DIR}
|
${WALLET} ${ADDR} ${WIF} = Init Wallet with Address ${TEMP_DIR}
|
||||||
${TX} = Transfer Mainnet Gas ${MAINNET_WALLET_WIF} ${ADDR} ${TRANSFER_AMOUNT}
|
${TX} = Transfer Mainnet Gas ${MAINNET_WALLET_WIF} ${ADDR} ${TRANSFER_AMOUNT}
|
||||||
|
|
||||||
Wait Until Keyword Succeeds ${MAINNET_TIMEOUT} ${MAINNET_BLOCK_TIME}
|
Wait Until Keyword Succeeds ${MAINNET_TIMEOUT} ${MAINNET_BLOCK_TIME}
|
||||||
... Transaction accepted in block ${TX}
|
... Transaction accepted in block ${TX}
|
||||||
|
|
||||||
${MAINNET_BALANCE} = Get Mainnet Balance ${ADDR}
|
${MAINNET_BALANCE} = Get Mainnet Balance ${ADDR}
|
||||||
Should Be Equal As Numbers ${MAINNET_BALANCE} ${TRANSFER_AMOUNT}
|
Should Be Equal As Numbers ${MAINNET_BALANCE} ${TRANSFER_AMOUNT}
|
||||||
|
|
||||||
${SCRIPT_HASH} = Get ScriptHash ${PRIV_KEY}
|
${TX_DEPOSIT} = NeoFS Deposit ${WIF} ${DEPOSIT_AMOUNT}
|
||||||
|
|
||||||
${TX_DEPOSIT} = NeoFS Deposit ${WALLET} ${ADDR} ${SCRIPT_HASH} ${DEPOSIT_AMOUNT}
|
|
||||||
Wait Until Keyword Succeeds ${MAINNET_TIMEOUT} ${MAINNET_BLOCK_TIME}
|
Wait Until Keyword Succeeds ${MAINNET_TIMEOUT} ${MAINNET_BLOCK_TIME}
|
||||||
... Transaction accepted in block ${TX_DEPOSIT}
|
... Transaction accepted in block ${TX_DEPOSIT}
|
||||||
|
|
||||||
${NEOFS_BALANCE} = Get NeoFS Balance ${PRIV_KEY}
|
${NEOFS_BALANCE} = Get NeoFS Balance ${WIF}
|
||||||
Should Be Equal As Numbers ${NEOFS_BALANCE} ${DEPOSIT_AMOUNT}
|
Should Be Equal As Numbers ${NEOFS_BALANCE} ${DEPOSIT_AMOUNT}
|
||||||
|
|
||||||
Set Global Variable ${PRIV_KEY} ${PRIV_KEY}
|
Set Global Variable ${PRIV_KEY} ${WIF}
|
||||||
Set Global Variable ${ADDR} ${ADDR}
|
Set Global Variable ${ADDR} ${ADDR}
|
||||||
|
|
||||||
Prepare container
|
Prepare container
|
||||||
|
|
|
@ -80,8 +80,3 @@ NeoFS Complex Object Operations
|
||||||
Cleanup
|
Cleanup
|
||||||
Cleanup Files
|
Cleanup Files
|
||||||
Get Docker Logs object_complex
|
Get Docker Logs object_complex
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -76,8 +76,3 @@ NeoFS Simple Object Operations
|
||||||
Cleanup
|
Cleanup
|
||||||
Cleanup Files
|
Cleanup Files
|
||||||
Get Docker Logs object_simple
|
Get Docker Logs object_simple
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,8 @@ NeoFS Deposit and Withdraw
|
||||||
|
|
||||||
[Setup] Create Temporary Directory
|
[Setup] Create Temporary Directory
|
||||||
|
|
||||||
${WALLET} ${ADDR} ${PRIV_KEY} = Init Wallet with Address ${TEMP_DIR}
|
${WALLET} ${ADDR} ${WIF} = Init Wallet with Address ${TEMP_DIR}
|
||||||
${SCRIPT_HASH} = Get ScriptHash ${PRIV_KEY}
|
${SCRIPT_HASH} = Get ScriptHash ${WIF}
|
||||||
|
|
||||||
##########################################################
|
##########################################################
|
||||||
# Transferring GAS from initial wallet to our test wallet
|
# Transferring GAS from initial wallet to our test wallet
|
||||||
|
@ -35,7 +35,7 @@ NeoFS Deposit and Withdraw
|
||||||
############################
|
############################
|
||||||
# Making deposit into NeoFS
|
# Making deposit into NeoFS
|
||||||
############################
|
############################
|
||||||
${TX_DEPOSIT} = NeoFS Deposit ${WALLET} ${ADDR} ${SCRIPT_HASH} ${DEPOSIT_AMOUNT}
|
${TX_DEPOSIT} = NeoFS Deposit ${WIF} ${DEPOSIT_AMOUNT}
|
||||||
Wait Until Keyword Succeeds ${MAINNET_TIMEOUT} ${MAINNET_BLOCK_TIME}
|
Wait Until Keyword Succeeds ${MAINNET_TIMEOUT} ${MAINNET_BLOCK_TIME}
|
||||||
... Transaction accepted in block ${TX_DEPOSIT}
|
... Transaction accepted in block ${TX_DEPOSIT}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ NeoFS Deposit and Withdraw
|
||||||
${DEPOSIT_FEE} = Evaluate ${EXPECTED_BALANCE} - ${MAINNET_BALANCE}
|
${DEPOSIT_FEE} = Evaluate ${EXPECTED_BALANCE} - ${MAINNET_BALANCE}
|
||||||
Log Deposit fee is ${DEPOSIT_FEE}
|
Log Deposit fee is ${DEPOSIT_FEE}
|
||||||
|
|
||||||
${NEOFS_BALANCE} = Get NeoFS Balance ${PRIV_KEY}
|
${NEOFS_BALANCE} = Get NeoFS Balance ${WIF}
|
||||||
Should Be Equal As Numbers ${NEOFS_BALANCE} ${DEPOSIT_AMOUNT}
|
Should Be Equal As Numbers ${NEOFS_BALANCE} ${DEPOSIT_AMOUNT}
|
||||||
|
|
||||||
# TODO: try to withdraw more than was deposited
|
# TODO: try to withdraw more than was deposited
|
||||||
|
@ -59,7 +59,7 @@ NeoFS Deposit and Withdraw
|
||||||
|
|
||||||
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
||||||
|
|
||||||
${NEOFS_BALANCE} = Get NeoFS Balance ${PRIV_KEY}
|
${NEOFS_BALANCE} = Get NeoFS Balance ${WIF}
|
||||||
${EXPECTED_BALANCE} = Evaluate ${DEPOSIT_AMOUNT} - ${WITHDRAW_AMOUNT}
|
${EXPECTED_BALANCE} = Evaluate ${DEPOSIT_AMOUNT} - ${WITHDRAW_AMOUNT}
|
||||||
Should Be Equal As Numbers ${NEOFS_BALANCE} ${EXPECTED_BALANCE}
|
Should Be Equal As Numbers ${NEOFS_BALANCE} ${EXPECTED_BALANCE}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,8 @@ Library ${KEYWORDS}/rpc_call_keywords.py
|
||||||
|
|
||||||
*** Variables ***
|
*** Variables ***
|
||||||
${PLACEMENT_RULE} = "REP 1 IN X CBF 1 SELECT 1 FROM * AS X"
|
${PLACEMENT_RULE} = "REP 1 IN X CBF 1 SELECT 1 FROM * AS X"
|
||||||
${TRANSFER_AMOUNT} = ${3}
|
${TRANSFER_AMOUNT} = ${6}
|
||||||
|
${DEPOSIT_AMOUNT} = ${5}
|
||||||
|
|
||||||
*** Test cases ***
|
*** Test cases ***
|
||||||
|
|
||||||
|
@ -19,49 +20,46 @@ NeoFS HTTP Gateway
|
||||||
[Timeout] 5 min
|
[Timeout] 5 min
|
||||||
|
|
||||||
[Setup] Create Temporary Directory
|
[Setup] Create Temporary Directory
|
||||||
${WALLET} ${ADDR} ${PRIV_KEY} = Init Wallet with Address ${TEMP_DIR}
|
${WALLET} ${ADDR} ${WIF} = Init Wallet with Address ${TEMP_DIR}
|
||||||
${TX} = Transfer Mainnet Gas ${MAINNET_WALLET_WIF} ${ADDR} 6
|
${TX} = Transfer Mainnet Gas ${MAINNET_WALLET_WIF} ${ADDR} ${TRANSFER_AMOUNT}
|
||||||
|
|
||||||
Wait Until Keyword Succeeds 1 min 15 sec
|
Wait Until Keyword Succeeds ${MAINNET_TIMEOUT} ${MAINNET_BLOCK_TIME}
|
||||||
... Transaction accepted in block ${TX}
|
... Transaction accepted in block ${TX}
|
||||||
|
|
||||||
${MAINNET_BALANCE} = Get Mainnet Balance ${ADDR}
|
${MAINNET_BALANCE} = Get Mainnet Balance ${ADDR}
|
||||||
Should Be Equal As Numbers ${MAINNET_BALANCE} ${TRANSFER_AMOUNT}
|
Should Be Equal As Numbers ${MAINNET_BALANCE} ${TRANSFER_AMOUNT}
|
||||||
|
|
||||||
${SCRIPT_HASH} = Get ScriptHash ${PRIV_KEY}
|
${TX_DEPOSIT} = NeoFS Deposit ${WIF} ${DEPOSIT_AMOUNT}
|
||||||
|
Wait Until Keyword Succeeds ${MAINNET_TIMEOUT} ${MAINNET_BLOCK_TIME}
|
||||||
${TX_DEPOSIT} = NeoFS Deposit ${WALLET} ${ADDR} ${SCRIPT_HASH} 5
|
|
||||||
Wait Until Keyword Succeeds 1 min 15 sec
|
|
||||||
... Transaction accepted in block ${TX_DEPOSIT}
|
... Transaction accepted in block ${TX_DEPOSIT}
|
||||||
Get Transaction ${TX_DEPOSIT}
|
|
||||||
|
|
||||||
${CID} = Create container ${PRIV_KEY} public ${PLACEMENT_RULE}
|
${CID} = Create container ${WIF} public ${PLACEMENT_RULE}
|
||||||
Wait Until Keyword Succeeds 2 min 30 sec
|
Wait Until Keyword Succeeds 2 min 30 sec
|
||||||
... Container Existing ${PRIV_KEY} ${CID}
|
... Container Existing ${WIF} ${CID}
|
||||||
|
|
||||||
${FILE} = Generate file of bytes ${SIMPLE_OBJ_SIZE}
|
${FILE} = Generate file of bytes ${SIMPLE_OBJ_SIZE}
|
||||||
${FILE_L} = Generate file of bytes ${COMPLEX_OBJ_SIZE}
|
${FILE_L} = Generate file of bytes ${COMPLEX_OBJ_SIZE}
|
||||||
${FILE_HASH} = Get file hash ${FILE}
|
${FILE_HASH} = Get file hash ${FILE}
|
||||||
${FILE_L_HASH} = Get file hash ${FILE_L}
|
${FILE_L_HASH} = Get file hash ${FILE_L}
|
||||||
|
|
||||||
${S_OID} = Put object ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} ${EMPTY}
|
${S_OID} = Put object ${WIF} ${FILE} ${CID} ${EMPTY} ${EMPTY}
|
||||||
${L_OID} = Put object ${PRIV_KEY} ${FILE_L} ${CID} ${EMPTY} ${EMPTY}
|
${L_OID} = Put object ${WIF} ${FILE_L} ${CID} ${EMPTY} ${EMPTY}
|
||||||
|
|
||||||
# By request from Service team - try to GET object from the node without object
|
# By request from Service team - try to GET object from the node without object
|
||||||
|
|
||||||
@{GET_NODE_LIST} = Get nodes without object ${PRIV_KEY} ${CID} ${S_OID}
|
@{GET_NODE_LIST} = Get nodes without object ${WIF} ${CID} ${S_OID}
|
||||||
${NODE} = Evaluate random.choice($GET_NODE_LIST) random
|
${NODE} = Evaluate random.choice($GET_NODE_LIST) random
|
||||||
|
|
||||||
${GET_OBJ_S} = Get object ${PRIV_KEY} ${CID} ${S_OID} ${EMPTY} s_file_read ${NODE}
|
${GET_OBJ_S} = Get object ${WIF} ${CID} ${S_OID} ${EMPTY} s_file_read ${NODE}
|
||||||
${FILEPATH} = Get via HTTP Gate ${CID} ${S_OID}
|
${FILEPATH} = Get via HTTP Gate ${CID} ${S_OID}
|
||||||
|
|
||||||
Verify file hash ${GET_OBJ_S} ${FILE_HASH}
|
Verify file hash ${GET_OBJ_S} ${FILE_HASH}
|
||||||
Verify file hash ${FILEPATH} ${FILE_HASH}
|
Verify file hash ${FILEPATH} ${FILE_HASH}
|
||||||
|
|
||||||
@{GET_NODE_LIST} = Get nodes without object ${PRIV_KEY} ${CID} ${L_OID}
|
@{GET_NODE_LIST} = Get nodes without object ${WIF} ${CID} ${L_OID}
|
||||||
${NODE} = Evaluate random.choice($GET_NODE_LIST) random
|
${NODE} = Evaluate random.choice($GET_NODE_LIST) random
|
||||||
|
|
||||||
${GET_OBJ_L} = Get object ${PRIV_KEY} ${CID} ${L_OID} ${EMPTY} l_file_read ${NODE}
|
${GET_OBJ_L} = Get object ${WIF} ${CID} ${L_OID} ${EMPTY} l_file_read ${NODE}
|
||||||
${FILEPATH} = Get via HTTP Gate ${CID} ${L_OID}
|
${FILEPATH} = Get via HTTP Gate ${CID} ${L_OID}
|
||||||
|
|
||||||
Verify file hash ${GET_OBJ_L} ${FILE_L_HASH}
|
Verify file hash ${GET_OBJ_L} ${FILE_L_HASH}
|
||||||
|
|
|
@ -4,9 +4,11 @@ Library Collections
|
||||||
Library ../${RESOURCES}/neofs.py
|
Library ../${RESOURCES}/neofs.py
|
||||||
Library ../${RESOURCES}/payment_neogo.py
|
Library ../${RESOURCES}/payment_neogo.py
|
||||||
Library ../${RESOURCES}/gates.py
|
Library ../${RESOURCES}/gates.py
|
||||||
Library ${KEYWORDS}/wallet.py
|
Library ${KEYWORDS}/wallet_keywords.py
|
||||||
Library ../${RESOURCES}/utility_keywords.py
|
Library ../${RESOURCES}/utility_keywords.py
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${DEPOSIT_AMOUNT} = ${5}
|
||||||
|
|
||||||
*** Test cases ***
|
*** Test cases ***
|
||||||
NeoFS S3 Gateway
|
NeoFS S3 Gateway
|
||||||
|
@ -15,13 +17,11 @@ NeoFS S3 Gateway
|
||||||
|
|
||||||
[Setup] Create Temporary Directory
|
[Setup] Create Temporary Directory
|
||||||
|
|
||||||
${PRIV_KEY} = Form WIF from String 1dd37fba80fec4e6a6f13fd708d8dcb3b29def768017052f6c930fa1c5d90bbb
|
${WIF} = Form WIF from String 1dd37fba80fec4e6a6f13fd708d8dcb3b29def768017052f6c930fa1c5d90bbb
|
||||||
${WALLET} ${ADDR} = Init Wallet from WIF ${TEMP_DIR} ${PRIV_KEY}
|
${WALLET} ${ADDR} = Init Wallet from WIF ${TEMP_DIR} ${WIF}
|
||||||
${SCRIPT_HASH} = Get ScriptHash ${PRIV_KEY}
|
${TX_DEPOSIT} = NeoFS Deposit ${WIF} ${DEPOSIT_AMOUNT}
|
||||||
${TX_DEPOSIT} = NeoFS Deposit ${WALLET} ${ADDR} ${SCRIPT_HASH} 5
|
|
||||||
Wait Until Keyword Succeeds 1 min 15 sec
|
Wait Until Keyword Succeeds 1 min 15 sec
|
||||||
... Transaction accepted in block ${TX_DEPOSIT}
|
... Transaction accepted in block ${TX_DEPOSIT}
|
||||||
Get Transaction ${TX_DEPOSIT}
|
|
||||||
|
|
||||||
${FILE_S3} = Generate file of bytes ${COMPLEX_OBJ_SIZE}
|
${FILE_S3} = Generate file of bytes ${COMPLEX_OBJ_SIZE}
|
||||||
${FILE_S3_HASH} = Get file hash ${FILE_S3}
|
${FILE_S3_HASH} = Get file hash ${FILE_S3}
|
||||||
|
@ -35,9 +35,9 @@ NeoFS S3 Gateway
|
||||||
... ${BUCKET}
|
... ${BUCKET}
|
||||||
... ${ACCESS_KEY_ID}
|
... ${ACCESS_KEY_ID}
|
||||||
... ${SEC_ACCESS_KEY}
|
... ${SEC_ACCESS_KEY}
|
||||||
... ${OWNER_PRIV_KEY} = Init S3 Credentials ${PRIV_KEY} keys/s3_docker_hcs.pub.key
|
... ${OWNER_PRIV_KEY} = Init S3 Credentials ${WIF} keys/s3_docker_hcs.pub.key
|
||||||
|
|
||||||
${CONTEINERS_LIST} = Container List ${PRIV_KEY}
|
${CONTEINERS_LIST} = Container List ${WIF}
|
||||||
List Should Contain Value ${CONTEINERS_LIST} ${CID}
|
List Should Contain Value ${CONTEINERS_LIST} ${CID}
|
||||||
|
|
||||||
${S3_CLIENT} = Config S3 client ${ACCESS_KEY_ID} ${SEC_ACCESS_KEY}
|
${S3_CLIENT} = Config S3 client ${ACCESS_KEY_ID} ${SEC_ACCESS_KEY}
|
||||||
|
@ -48,8 +48,8 @@ NeoFS S3 Gateway
|
||||||
Put object S3 ${S3_CLIENT} ${BUCKET} ${FILE_S3}
|
Put object S3 ${S3_CLIENT} ${BUCKET} ${FILE_S3}
|
||||||
Head object S3 ${S3_CLIENT} ${BUCKET} ${FILE_S3_NAME}
|
Head object S3 ${S3_CLIENT} ${BUCKET} ${FILE_S3_NAME}
|
||||||
|
|
||||||
${OID_FS} = Put object ${PRIV_KEY} ${FILE_FS} ${CID} ${EMPTY} ${EMPTY}
|
${OID_FS} = Put object ${WIF} ${FILE_FS} ${CID} ${EMPTY} ${EMPTY}
|
||||||
Head object ${PRIV_KEY} ${CID} ${OID_FS} ${EMPTY}
|
Head object ${WIF} ${CID} ${OID_FS} ${EMPTY}
|
||||||
|
|
||||||
${LIST_S3_OBJECTS} = List objects S3 ${S3_CLIENT} ${BUCKET}
|
${LIST_S3_OBJECTS} = List objects S3 ${S3_CLIENT} ${BUCKET}
|
||||||
List Should Contain Value ${LIST_S3_OBJECTS} ${FILE_S3_NAME}
|
List Should Contain Value ${LIST_S3_OBJECTS} ${FILE_S3_NAME}
|
||||||
|
@ -59,7 +59,7 @@ NeoFS S3 Gateway
|
||||||
List Should Contain Value ${LIST_V2_S3_OBJECTS} ${FILE_S3_NAME}
|
List Should Contain Value ${LIST_V2_S3_OBJECTS} ${FILE_S3_NAME}
|
||||||
List Should Contain Value ${LIST_V2_S3_OBJECTS} ${FILE_S3_NAME}
|
List Should Contain Value ${LIST_V2_S3_OBJECTS} ${FILE_S3_NAME}
|
||||||
|
|
||||||
${OID_LIST_S3} = Search object ${PRIV_KEY} ${CID} ${EMPTY} ${EMPTY} FileName=${FILE_S3_NAME}
|
${OID_LIST_S3} = Search object ${WIF} ${CID} ${EMPTY} ${EMPTY} FileName=${FILE_S3_NAME}
|
||||||
${OID_S3} = Get From List ${OID_LIST_S3} 0
|
${OID_S3} = Get From List ${OID_LIST_S3} 0
|
||||||
|
|
||||||
Get object S3 ${S3_CLIENT} ${BUCKET} ${FILE_S3_NAME} s3_obj_get_s3
|
Get object S3 ${S3_CLIENT} ${BUCKET} ${FILE_S3_NAME} s3_obj_get_s3
|
||||||
|
@ -68,8 +68,8 @@ NeoFS S3 Gateway
|
||||||
Verify file hash s3_obj_get_s3 ${FILE_S3_HASH}
|
Verify file hash s3_obj_get_s3 ${FILE_S3_HASH}
|
||||||
Verify file hash fs_obj_get_s3 ${FILE_FS_HASH}
|
Verify file hash fs_obj_get_s3 ${FILE_FS_HASH}
|
||||||
|
|
||||||
Get object ${PRIV_KEY} ${CID} ${OID_S3} ${EMPTY} s3_obj_get_fs
|
Get object ${WIF} ${CID} ${OID_S3} ${EMPTY} s3_obj_get_fs
|
||||||
Get object ${PRIV_KEY} ${CID} ${OID_FS} ${EMPTY} fs_obj_get_fs
|
Get object ${WIF} ${CID} ${OID_FS} ${EMPTY} fs_obj_get_fs
|
||||||
|
|
||||||
Verify file hash s3_obj_get_fs ${FILE_S3_HASH}
|
Verify file hash s3_obj_get_fs ${FILE_S3_HASH}
|
||||||
Verify file hash fs_obj_get_fs ${FILE_FS_HASH}
|
Verify file hash fs_obj_get_fs ${FILE_FS_HASH}
|
||||||
|
|
|
@ -31,12 +31,8 @@ MAINNET_WALLET_WIF = os.getenv("MAINNET_WALLET_WIF", "KxDgvEKzgSBPPfuVfw67oPQBSj
|
||||||
NEOFS_ENDPOINT = os.getenv("NEOFS_ENDPOINT", "s01.neofs.devenv:8080")
|
NEOFS_ENDPOINT = os.getenv("NEOFS_ENDPOINT", "s01.neofs.devenv:8080")
|
||||||
NEOGO_CLI_EXEC = os.getenv("NEOGO_CLI_EXEC", "neo-go")
|
NEOGO_CLI_EXEC = os.getenv("NEOGO_CLI_EXEC", "neo-go")
|
||||||
|
|
||||||
NEO_MAINNET_ENDPOINT = (os.getenv("NEO_MAINNET_ENDPOINT") if os.getenv("NEO_MAINNET_ENDPOINT")
|
NEO_MAINNET_ENDPOINT = os.getenv("NEO_MAINNET_ENDPOINT", 'http://main_chain.neofs.devenv:30333')
|
||||||
else os.getenv("NEOFS_IR_MAINNET_ENDPOINT_CLIENT", 'http://main_chain.neofs.devenv:30333'))
|
NEOFS_NEO_API_ENDPOINT = os.getenv("NEOFS_NEO_API_ENDPOINT", 'http://morph_chain.neofs.devenv:30333')
|
||||||
|
|
||||||
NEOFS_NEO_API_ENDPOINT = (os.getenv("NEOFS_NEO_API_ENDPOINT") if os.getenv("NEOFS_NEO_API_ENDPOINT")
|
|
||||||
else os.getenv("NEOFS_IR_MORPH_ENDPOINT_CLIENT", 'http://morph_chain.neofs.devenv:30333'))
|
|
||||||
|
|
||||||
HTTP_GATE = os.getenv("HTTP_GATE", 'http://http.neofs.devenv')
|
HTTP_GATE = os.getenv("HTTP_GATE", 'http://http.neofs.devenv')
|
||||||
S3_GATE = os.getenv("S3_GATE", 'https://s3.neofs.devenv:8080')
|
S3_GATE = os.getenv("S3_GATE", 'https://s3.neofs.devenv:8080')
|
||||||
NEOFS_NETMAP = os.getenv("NEOFS_NETMAP", ['s01.neofs.devenv:8080', 's02.neofs.devenv:8080','s03.neofs.devenv:8080','s04.neofs.devenv:8080'])
|
NEOFS_NETMAP = os.getenv("NEOFS_NETMAP", ['s01.neofs.devenv:8080', 's02.neofs.devenv:8080','s03.neofs.devenv:8080','s04.neofs.devenv:8080'])
|
||||||
|
|
Loading…
Reference in a new issue