From cc9780f4c58f5a97c2eb84814367ef62caf362f4 Mon Sep 17 00:00:00 2001 From: EliChin Date: Tue, 24 Aug 2021 14:13:36 +0300 Subject: [PATCH] Set common placement rule Signed-off-by: EliChin --- .../integration/acl/common_steps_acl_basic.robot | 10 +++------- .../integration/acl/common_steps_acl_bearer.robot | 2 -- .../integration/acl/common_steps_acl_extended.robot | 4 +--- .../integration/object/common_steps_object.robot | 3 ++- robot/variables/common.py | 2 +- 5 files changed, 7 insertions(+), 14 deletions(-) diff --git a/robot/testsuites/integration/acl/common_steps_acl_basic.robot b/robot/testsuites/integration/acl/common_steps_acl_basic.robot index 9f0f1b51..10cae06f 100644 --- a/robot/testsuites/integration/acl/common_steps_acl_basic.robot +++ b/robot/testsuites/integration/acl/common_steps_acl_basic.robot @@ -1,23 +1,19 @@ *** Settings *** Variables ../../../variables/common.py -*** Variables *** -${RULE_FOR_ALL} = REP 2 IN X CBF 1 SELECT 4 FROM * AS X - - *** Keywords *** Create Containers Log Create Private Container - ${PRIV_CID_GEN} = Create container ${USER_KEY} 0x18888888 ${RULE_FOR_ALL} + ${PRIV_CID_GEN} = Create container ${USER_KEY} 0x18888888 ${COMMON_PLACEMENT_RULE} Container Existing ${USER_KEY} ${PRIV_CID_GEN} Log Create Public Container - ${PUBLIC_CID_GEN} = Create container ${USER_KEY} 0x1FFFFFFF ${RULE_FOR_ALL} + ${PUBLIC_CID_GEN} = Create container ${USER_KEY} 0x1FFFFFFF ${COMMON_PLACEMENT_RULE} Container Existing ${USER_KEY} ${PUBLIC_CID_GEN} Log Create Read-Only Container - ${READONLY_CID_GEN} = Create container ${USER_KEY} 0x1FFF88FF ${RULE_FOR_ALL} + ${READONLY_CID_GEN} = Create container ${USER_KEY} 0x1FFF88FF ${COMMON_PLACEMENT_RULE} Container Existing ${USER_KEY} ${READONLY_CID_GEN} Set Global Variable ${PRIV_CID} ${PRIV_CID_GEN} diff --git a/robot/testsuites/integration/acl/common_steps_acl_bearer.robot b/robot/testsuites/integration/acl/common_steps_acl_bearer.robot index d2e87509..46af5a10 100644 --- a/robot/testsuites/integration/acl/common_steps_acl_bearer.robot +++ b/robot/testsuites/integration/acl/common_steps_acl_bearer.robot @@ -5,8 +5,6 @@ Variables ../../../variables/common.py ${FILE_USR_HEADER} = key1=1,key2=abc ${FILE_USR_HEADER_DEL} = key1=del,key2=del ${FILE_OTH_HEADER} = key1=oth,key2=oth -${RULE_FOR_ALL} = REP 2 IN X CBF 1 SELECT 4 FROM * AS X - *** Keywords *** diff --git a/robot/testsuites/integration/acl/common_steps_acl_extended.robot b/robot/testsuites/integration/acl/common_steps_acl_extended.robot index 66417556..4850e522 100644 --- a/robot/testsuites/integration/acl/common_steps_acl_extended.robot +++ b/robot/testsuites/integration/acl/common_steps_acl_extended.robot @@ -5,14 +5,12 @@ Variables ../../../variables/common.py ${FILE_USR_HEADER} = key1=1,key2=abc ${FILE_USR_HEADER_DEL} = key1=del,key2=del ${FILE_OTH_HEADER} = key1=oth,key2=oth -${RULE_FOR_ALL} = REP 2 IN X CBF 1 SELECT 4 FROM * AS X - *** Keywords *** Create Container Public Log Create Public Container - ${PUBLIC_CID_GEN} = Create container ${USER_KEY} 0x4FFFFFFF ${RULE_FOR_ALL} + ${PUBLIC_CID_GEN} = Create container ${USER_KEY} 0x4FFFFFFF ${COMMON_PLACEMENT_RULE} [Return] ${PUBLIC_CID_GEN} diff --git a/robot/testsuites/integration/object/common_steps_object.robot b/robot/testsuites/integration/object/common_steps_object.robot index ac9c8bae..af35fc45 100644 --- a/robot/testsuites/integration/object/common_steps_object.robot +++ b/robot/testsuites/integration/object/common_steps_object.robot @@ -8,6 +8,7 @@ Library ${KEYWORDS}/rpc_call_keywords.py ${FILE_USR_HEADER} = key1=1,key2=abc ${FILE_USR_HEADER_OTH} = key1=2 ${UNEXIST_OID} = B2DKvkHnLnPvapbDgfpU1oVUPuXQo5LTfKVxmNDZXQff +${PLACEMENT_RULE} = REP 2 IN X CBF 1 SELECT 2 FROM * AS X *** Keywords *** @@ -15,7 +16,7 @@ Prepare container [Arguments] ${WIF} ${NEOFS_BALANCE} = Get NeoFS Balance ${WIF} - ${CID} = Create container ${WIF} ${EMPTY} ${COMMON_PLACEMENT_RULE} + ${CID} = Create container ${WIF} ${EMPTY} ${PLACEMENT_RULE} Container Existing ${WIF} ${CID} ${NEW_NEOFS_BALANCE} = Get NeoFS Balance ${WIF} diff --git a/robot/variables/common.py b/robot/variables/common.py index 51db8df1..faf1c269 100644 --- a/robot/variables/common.py +++ b/robot/variables/common.py @@ -41,7 +41,7 @@ GAS_HASH = os.getenv("GAS_HASH", '0xd2a4cff31913016155e38e474a2c06d08be276cf') NEOFS_CONTRACT = (os.getenv("NEOFS_CONTRACT") if os.getenv("NEOFS_CONTRACT") else os.getenv("NEOFS_IR_CONTRACTS_NEOFS", '008b43d3de8741b896015f79ac0fbfa4055b4574')) -COMMON_PLACEMENT_RULE = "REP 2 IN X CBF 1 SELECT 2 FROM * AS X" +COMMON_PLACEMENT_RULE = "REP 2 IN X CBF 1 SELECT 4 FROM * AS X" ASSETS_DIR = os.getenv("ASSETS_DIR", "TemporaryDir/")