"Neofs Deposit" moved to keywords repo and changed its signature

Signed-off-by: anastasia prasolova <anastasia@nspcc.ru>
This commit is contained in:
anastasia prasolova 2021-06-01 15:07:31 +03:00 committed by Anastasia Prasolova
parent e0b0cbf823
commit 8d50305982
37 changed files with 252 additions and 354 deletions

View file

@ -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):
""" """

View 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}

View file

@ -1,10 +1,11 @@
*** Settings *** *** Settings ***
Variables ../../../variables/common.py 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
Resource common_steps_acl_basic.robot Resource common_steps_acl_basic.robot
Resource ../${RESOURCES}/payment_operations.robot
*** Test cases *** *** Test cases ***
@ -66,7 +67,7 @@ Check Private Container
Get Range Hash ${SYSTEM_KEY_SN} ${PRIV_CID} ${S_OID_USER} ${EMPTY} 0:256 Get Range Hash ${SYSTEM_KEY_SN} ${PRIV_CID} ${S_OID_USER} ${EMPTY} 0:256
# Search # Search
@{S_OBJ_PRIV} = Create List ${S_OID_USER} ${S_OID_SYS_SN} @{S_OBJ_PRIV} = Create List ${S_OID_USER} ${S_OID_SYS_SN}
Search object ${USER_KEY} ${PRIV_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_PRIV} Search object ${USER_KEY} ${PRIV_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_PRIV}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Search object ${OTHER_KEY} ${PRIV_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_PRIV} ... Search object ${OTHER_KEY} ${PRIV_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_PRIV}

View file

@ -1,11 +1,12 @@
*** Settings *** *** Settings ***
Variables ../../../variables/common.py Variables ../../../variables/common.py
Library Collections Library Collections
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
Resource common_steps_acl_basic.robot Resource common_steps_acl_basic.robot
Resource ../${RESOURCES}/payment_operations.robot
*** Test cases *** *** Test cases ***

View file

@ -1,10 +1,11 @@
*** Settings *** *** Settings ***
Variables ../../../variables/common.py 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
Resource common_steps_acl_basic.robot Resource common_steps_acl_basic.robot
Resource ../${RESOURCES}/payment_operations.robot
*** Test cases *** *** Test cases ***

View file

@ -1,11 +1,12 @@
*** Settings *** *** Settings ***
Variables ../../../variables/common.py 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
Resource common_steps_acl_basic.robot Resource common_steps_acl_basic.robot
Resource ../${RESOURCES}/payment_operations.robot
*** Test cases *** *** Test cases ***

View file

@ -1,10 +1,11 @@
*** Settings *** *** Settings ***
Variables ../../../variables/common.py 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
Resource common_steps_acl_basic.robot Resource common_steps_acl_basic.robot
Resource ../${RESOURCES}/payment_operations.robot
*** Test cases *** *** Test cases ***

View file

@ -1,11 +1,12 @@
*** Settings *** *** Settings ***
Variables ../../../variables/common.py 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
Resource common_steps_acl_basic.robot Resource common_steps_acl_basic.robot
Resource ../${RESOURCES}/payment_operations.robot
*** Test cases *** *** Test cases ***

View file

@ -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
@ -37,18 +39,18 @@ BearerToken Operations
Check eACL Deny and Allow All Bearer Check eACL Deny and Allow All Bearer
${CID} = Create Container Public ${CID} = Create Container Public
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL} ${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL}
@{S_OBJ_H} = Create List ${S_OID_USER} @{S_OBJ_H} = Create List ${S_OID_USER}
Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Delete object ${USER_KEY} ${CID} ${D_OID_USER} ${EMPTY} Delete object ${USER_KEY} ${CID} ${D_OID_USER} ${EMPTY}
Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_USER} --await Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_USER} --await
# The current ACL cache lifetime is 30 sec # The current ACL cache lifetime is 30 sec
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT} Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
@ -63,28 +65,28 @@ Check eACL Deny and Allow All Bearer
${eACL_gen}= Create List ${rule1} ${rule2} ${rule3} ${rule4} ${rule5} ${rule6} ${rule7} ${eACL_gen}= Create List ${rule1} ${rule2} ${rule3} ${rule4} ${rule5} ${rule6} ${rule7}
Form BearerToken file ${USER_KEY} ${CID} bearer_allow_all_user ${eACL_gen} 100500 Form BearerToken file ${USER_KEY} ${CID} bearer_allow_all_user ${eACL_gen} 100500
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ... Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl ... Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} ... Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ... Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 ... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Delete object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ... Delete object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
# All operations on object should be passed with bearer token # All operations on object should be passed with bearer token
Put object ${USER_KEY} ${FILE_S} ${CID} bearer_allow_all_user ${FILE_OTH_HEADER} Put object ${USER_KEY} ${FILE_S} ${CID} bearer_allow_all_user ${FILE_OTH_HEADER}
Get object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user local_file_eacl Get object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user local_file_eacl
Search object ${USER_KEY} ${CID} ${EMPTY} bearer_allow_all_user ${FILE_USR_HEADER} ${S_OBJ_H} Search object ${USER_KEY} ${CID} ${EMPTY} bearer_allow_all_user ${FILE_USR_HEADER} ${S_OBJ_H}
Head object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user Head object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user
Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range bearer_allow_all_user 0:256 Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range bearer_allow_all_user 0:256
Delete object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user Delete object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user
Cleanup Cleanup
Cleanup Files Cleanup Files

View file

@ -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

View file

@ -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

View file

@ -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
@ -36,19 +38,19 @@ BearerToken Operations with Filter OID Equal
Check eACL Deny and Allow All Bearer Filter OID Equal Check eACL Deny and Allow All Bearer Filter OID Equal
${CID} = Create Container Public ${CID} = Create Container Public
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${S_OID_USER_2} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${EMPTY} ${S_OID_USER_2} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${EMPTY}
${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL} ${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL}
@{S_OBJ_H} = Create List ${S_OID_USER} @{S_OBJ_H} = Create List ${S_OID_USER}
Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Delete object ${USER_KEY} ${CID} ${D_OID_USER} ${EMPTY} Delete object ${USER_KEY} ${CID} ${D_OID_USER} ${EMPTY}
Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_USER} --await Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_USER} --await
# The current ACL cache lifetime is 30 sec # The current ACL cache lifetime is 30 sec
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT} Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
@ -65,34 +67,34 @@ Check eACL Deny and Allow All Bearer Filter OID Equal
${eACL_gen}= Create List ${rule1} ${rule2} ${rule3} ${rule4} ${rule5} ${rule6} ${rule7} ${eACL_gen}= Create List ${rule1} ${rule2} ${rule3} ${rule4} ${rule5} ${rule6} ${rule7}
Form BearerToken file ${USER_KEY} ${CID} bearer_allow_all_user ${eACL_gen} 100500 Form BearerToken file ${USER_KEY} ${CID} bearer_allow_all_user ${eACL_gen} 100500
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ... Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl ... Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} ... Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ... Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 ... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Delete object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ... Delete object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Search object ${USER_KEY} ${CID} ${EMPTY} bearer_allow_all_user ${FILE_USR_HEADER} ${S_OBJ_H} ... Search object ${USER_KEY} ${CID} ${EMPTY} bearer_allow_all_user ${FILE_USR_HEADER} ${S_OBJ_H}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Put object ${USER_KEY} ${FILE_S} ${CID} bearer_allow_all_user ${FILE_OTH_HEADER} ... Put object ${USER_KEY} ${FILE_S} ${CID} bearer_allow_all_user ${FILE_OTH_HEADER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get object ${USER_KEY} ${CID} ${S_OID_USER_2} bearer_allow_all_user local_file_eacl ... Get object ${USER_KEY} ${CID} ${S_OID_USER_2} bearer_allow_all_user local_file_eacl
Get object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user local_file_eacl Get object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user local_file_eacl
Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range bearer_allow_all_user 0:256 Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range bearer_allow_all_user 0:256
Head object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user Head object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user
Delete object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user Delete object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Delete object ${USER_KEY} ${CID} ${D_OID_USER} bearer_allow_all_user ... Delete object ${USER_KEY} ${CID} ${D_OID_USER} bearer_allow_all_user
Cleanup Cleanup

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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
@ -38,7 +40,7 @@ Check eACL Allow All Bearer Filter Requst Equal Deny
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${S_OID_USER_2} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${EMPTY} ${S_OID_USER_2} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${EMPTY}
${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL} ${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL}
@{S_OBJ_H} = Create List ${S_OID_USER} @{S_OBJ_H} = Create List ${S_OID_USER}
${filters}= Create Dictionary headerType=REQUEST matchType=STRING_EQUAL key=a value=256 ${filters}= Create Dictionary headerType=REQUEST matchType=STRING_EQUAL key=a value=256

View file

@ -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
@ -39,7 +41,7 @@ Check eACL Deny and Allow All Bearer Filter Requst Equal
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${S_OID_USER_2} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${EMPTY} ${S_OID_USER_2} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${EMPTY}
${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL} ${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL}
@{S_OBJ_H} = Create List ${S_OID_USER} @{S_OBJ_H} = Create List ${S_OID_USER}
Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl

View file

@ -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
@ -38,7 +40,7 @@ Check eACL Deny and Allow All Bearer Filter Requst NotEqual
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${S_OID_USER_2} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${EMPTY} ${S_OID_USER_2} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${EMPTY}
${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL} ${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL}
@{S_OBJ_H} = Create List ${S_OID_USER} @{S_OBJ_H} = Create List ${S_OID_USER}
Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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
@ -135,7 +137,7 @@ Check eACL MatchType String Equal Object
Log Set eACL for Deny GET operation with StringEqual Object ID Log Set eACL for Deny GET operation with StringEqual Object ID
${ID_value} = Get From Dictionary ${HEADER_DICT} ID ${ID_value} = Get From Dictionary ${HEADER_DICT} ID
${filters} = Create Dictionary headerType=OBJECT matchType=STRING_EQUAL key=$Object:objectID value=${ID_value} ${filters} = Create Dictionary headerType=OBJECT matchType=STRING_EQUAL key=$Object:objectID value=${ID_value}
${rule1} = Create Dictionary Operation=GET Access=DENY Role=OTHERS Filters=${filters} ${rule1} = Create Dictionary Operation=GET Access=DENY Role=OTHERS Filters=${filters}
@ -178,7 +180,7 @@ Check eACL MatchType String Not Equal Object
Get object ${OTHER_KEY} ${CID} ${S_OID_OTHER} ${EMPTY} local_file_eacl Get object ${OTHER_KEY} ${CID} ${S_OID_OTHER} ${EMPTY} local_file_eacl
Log Set eACL for Deny GET operation with StringNotEqual Object ID Log Set eACL for Deny GET operation with StringNotEqual Object ID
${ID_value} = Get From Dictionary ${HEADER_DICT} ID ${ID_value} = Get From Dictionary ${HEADER_DICT} ID
${filters} = Create Dictionary headerType=OBJECT matchType=STRING_NOT_EQUAL key=$Object:objectID value=${ID_value} ${filters} = Create Dictionary headerType=OBJECT matchType=STRING_NOT_EQUAL key=$Object:objectID value=${ID_value}
${rule1} = Create Dictionary Operation=GET Access=DENY Role=OTHERS Filters=${filters} ${rule1} = Create Dictionary Operation=GET Access=DENY Role=OTHERS Filters=${filters}

View file

@ -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}

View file

@ -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} Set Global Variable ${EACL_KEY} ${EACL_KEY_GEN}
${SYSTEM_KEY_GEN_SN} = Set Variable ${NEOFS_SN_WIF} Set Global Variable ${SYSTEM_KEY} ${NEOFS_IR_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}
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

View file

@ -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

View file

@ -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}

View file

@ -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}
Start nodes @{NODES_OBJ_STOPPED}
Find in Nodes Log object successfully replicated ${NODES_LOG_TIME} # We have 2 or 3 copies. Expected behaviour: after one epoch potential 3rd copy should be removed.
Sleep ${NEOFS_EPOCH_TIMEOUT}
Start nodes @{NODES_OBJ_STOPPED} Validate storage policy for object ${WIF} 2 ${CID} ${S_OID}
# We have 2 or 3 copies. Expected behaviour: after one epoch potential 3rd copy should be removed.
Sleep ${NEOFS_EPOCH_TIMEOUT}
Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${S_OID}
[Teardown] Cleanup [Teardown] Cleanup

View file

@ -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

View file

@ -31,8 +31,8 @@ NeoFS Complex Object Operations
Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${H_OID} Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${H_OID}
Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${H_OID_OTH} Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${H_OID_OTH}
@{S_OBJ_ALL} = Create List ${S_OID} ${H_OID} ${H_OID_OTH} @{S_OBJ_ALL} = Create List ${S_OID} ${H_OID} ${H_OID_OTH}
@{S_OBJ_H} = Create List ${H_OID} @{S_OBJ_H} = Create List ${H_OID}
@{S_OBJ_H_OTH} = Create List ${H_OID_OTH} @{S_OBJ_H_OTH} = Create List ${H_OID_OTH}
Search object ${PRIV_KEY} ${CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_ALL} Search object ${PRIV_KEY} ${CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_ALL}
@ -80,8 +80,3 @@ NeoFS Complex Object Operations
Cleanup Cleanup
Cleanup Files Cleanup Files
Get Docker Logs object_complex Get Docker Logs object_complex

View file

@ -22,20 +22,20 @@ NeoFS Simple Object Operations
${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 ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} ${EMPTY}
${H_OID} = Put object ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${H_OID} = Put object ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${H_OID_OTH} = Put object ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} ${FILE_USR_HEADER_OTH} ${H_OID_OTH} = Put object ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} ${FILE_USR_HEADER_OTH}
Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${S_OID} Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${S_OID}
Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${H_OID} Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${H_OID}
Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${H_OID_OTH} Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${H_OID_OTH}
@{S_OBJ_ALL} = Create List ${S_OID} ${H_OID} ${H_OID_OTH} @{S_OBJ_ALL} = Create List ${S_OID} ${H_OID} ${H_OID_OTH}
@{S_OBJ_H} = Create List ${H_OID} @{S_OBJ_H} = Create List ${H_OID}
@{S_OBJ_H_OTH} = Create List ${H_OID_OTH} @{S_OBJ_H_OTH} = Create List ${H_OID_OTH}
${GET_OBJ_S} = Get object ${PRIV_KEY} ${CID} ${S_OID} ${EMPTY} s_file_read ${GET_OBJ_S} = Get object ${PRIV_KEY} ${CID} ${S_OID} ${EMPTY} s_file_read
${GET_OBJ_H} = Get object ${PRIV_KEY} ${CID} ${H_OID} ${EMPTY} h_file_read ${GET_OBJ_H} = Get object ${PRIV_KEY} ${CID} ${H_OID} ${EMPTY} h_file_read
Verify file hash ${GET_OBJ_S} ${FILE_HASH} Verify file hash ${GET_OBJ_S} ${FILE_HASH}
Verify file hash ${GET_OBJ_H} ${FILE_HASH} Verify file hash ${GET_OBJ_H} ${FILE_HASH}
@ -76,8 +76,3 @@ NeoFS Simple Object Operations
Cleanup Cleanup
Cleanup Files Cleanup Files
Get Docker Logs object_simple Get Docker Logs object_simple

View file

@ -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}

View file

@ -9,8 +9,9 @@ Library ${KEYWORDS}/wallet_keywords.py
Library ${KEYWORDS}/rpc_call_keywords.py 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,50 +20,47 @@ 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}
Verify file hash ${FILEPATH} ${FILE_L_HASH} Verify file hash ${FILEPATH} ${FILE_L_HASH}

View file

@ -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}

View file

@ -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'])