2020-09-01 03:23:17 +00:00
*** Settings ***
2022-04-25 09:53:20 +00:00
Library container.py
2022-03-15 11:58:59 +00:00
Library neofs_verbs.py
2022-05-26 09:44:13 +00:00
Library storage_policy.py
2022-05-20 11:18:14 +00:00
Library utility_keywords.py
2021-05-07 12:14:37 +00:00
2022-05-26 09:44:13 +00:00
Library Collections
2021-12-09 10:58:51 +00:00
Resource payment_operations.robot
Resource setup_teardown.robot
2021-04-26 10:30:40 +00:00
2020-09-01 03:23:17 +00:00
*** Test cases ***
NeoFS Simple Netmap
[Documentation] Testcase to validate NeoFS Netmap.
2022-04-25 09:53:20 +00:00
[Tags] Netmap
2020-09-01 03:23:17 +00:00
[Timeout] 20 min
2021-04-26 10:30:40 +00:00
2022-02-01 13:42:41 +00:00
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
2020-09-01 03:23:17 +00:00
2022-05-26 09:44:13 +00:00
Validate Object Copies ${WALLET} REP 2 IN X CBF 2 SELECT 2 FROM * AS X 2
2020-09-01 03:23:17 +00:00
2022-05-26 09:44:13 +00:00
Validate Object Copies ${WALLET} REP 2 IN X CBF 1 SELECT 2 FROM * AS X 2
2020-09-01 03:23:17 +00:00
2022-05-26 09:44:13 +00:00
Validate Object Copies ${WALLET} REP 3 IN X CBF 1 SELECT 3 FROM * AS X 3
2020-09-01 03:23:17 +00:00
2022-05-26 09:44:13 +00:00
Validate Object Copies ${WALLET} REP 1 IN X CBF 1 SELECT 1 FROM * AS X 1
2020-09-01 03:23:17 +00:00
2022-05-26 09:44:13 +00:00
Validate Object Copies ${WALLET} REP 1 IN X CBF 2 SELECT 1 FROM * AS X 1
2020-09-01 03:23:17 +00:00
2022-05-26 09:44:13 +00:00
Validate Object Copies ${WALLET} REP 4 IN X CBF 1 SELECT 4 FROM * AS X 4
2020-09-01 03:23:17 +00:00
2022-05-26 09:44:13 +00:00
Validate Object Copies ${WALLET} REP 2 IN X CBF 1 SELECT 4 FROM * AS X 2
2020-09-01 03:23:17 +00:00
2022-05-26 09:44:13 +00:00
@{EXPECTED} = Create List s01.neofs.devenv:8080 s02.neofs.devenv:8080 s03.neofs.devenv:8080 s04.neofs.devenv:8080
Validate Selected Nodes ${WALLET} REP 4 IN X CBF 1 SELECT 4 FROM * AS X 4 @{EXPECTED}
2020-09-01 03:23:17 +00:00
2022-05-26 09:44:13 +00:00
@{EXPECTED} = Create List s03.neofs.devenv:8080
Validate Selected Nodes ${WALLET} REP 1 IN LOC_PLACE CBF 1 SELECT 1 FROM LOC_SW AS LOC_PLACE FILTER Country EQ Sweden AS LOC_SW
2022-02-01 13:42:41 +00:00
... 1 @{EXPECTED}
2020-09-01 03:23:17 +00:00
2022-05-26 09:44:13 +00:00
@{EXPECTED} = Create List s02.neofs.devenv:8080
Validate Selected Nodes ${WALLET} REP 1 CBF 1 SELECT 1 FROM LOC_SPB FILTER 'UN-LOCODE' EQ 'RU LED' AS LOC_SPB 1 @{EXPECTED}
2020-09-01 03:23:17 +00:00
2022-05-26 09:44:13 +00:00
@{EXPECTED} = Create List s01.neofs.devenv:8080 s02.neofs.devenv:8080
Validate Selected Nodes ${WALLET}
... REP 1 IN LOC_SPB_PLACE REP 1 IN LOC_MSK_PLACE CBF 1 SELECT 1 FROM LOC_SPB AS LOC_SPB_PLACE SELECT 1 FROM LOC_MSK AS LOC_MSK_PLACE FILTER 'UN-LOCODE' EQ 'RU LED' AS LOC_SPB FILTER 'UN-LOCODE' EQ 'RU MOW' AS LOC_MSK
... 2 @{EXPECTED}
2020-09-01 03:23:17 +00:00
2022-05-26 09:44:13 +00:00
@{EXPECTED} = Create List s01.neofs.devenv:8080 s02.neofs.devenv:8080 s03.neofs.devenv:8080 s04.neofs.devenv:8080
Validate Selected Nodes ${WALLET} REP 4 CBF 1 SELECT 4 FROM LOC_EU FILTER Continent EQ Europe AS LOC_EU 4 @{EXPECTED}
2020-11-27 00:33:11 +00:00
2022-05-26 09:44:13 +00:00
@{EXPECTED} = Create List s02.neofs.devenv:8080
Validate Selected Nodes ${WALLET}
... REP 1 CBF 1 SELECT 1 FROM LOC_SPB FILTER 'UN-LOCODE' NE 'RU MOW' AND 'UN-LOCODE' NE 'SE STO' AND 'UN-LOCODE' NE 'FI HEL' AS LOC_SPB
... 1 @{EXPECTED}
2020-11-27 00:33:11 +00:00
2022-05-26 09:44:13 +00:00
@{EXPECTED} = Create List s01.neofs.devenv:8080 s02.neofs.devenv:8080
Validate Selected Nodes ${WALLET} REP 2 CBF 1 SELECT 2 FROM LOC_RU FILTER SubDivCode NE 'AB' AND SubDivCode NE '18' AS LOC_RU 2 @{EXPECTED}
2020-11-27 00:33:11 +00:00
2022-05-26 09:44:13 +00:00
@{EXPECTED} = Create List s01.neofs.devenv:8080 s02.neofs.devenv:8080
Validate Selected Nodes ${WALLET} REP 2 CBF 1 SELECT 2 FROM LOC_RU FILTER Country EQ 'Russia' AS LOC_RU 2 @{EXPECTED}
2020-11-27 00:33:11 +00:00
2022-05-26 09:44:13 +00:00
@{EXPECTED} = Create List s03.neofs.devenv:8080 s04.neofs.devenv:8080
Validate Selected Nodes ${WALLET} REP 2 CBF 1 SELECT 2 FROM LOC_EU FILTER Country NE 'Russia' AS LOC_EU 2 @{EXPECTED}
2021-04-26 10:30:40 +00:00
2022-05-26 09:44:13 +00:00
${ERR} = Run Keyword And Expect Error *
... Validate Selected Nodes ${WALLET} REP 2 IN X CBF 2 SELECT 6 FROM * AS X 2
Should Contain ${ERR} code = 1024 message = netmap: not enough nodes to SELECT from
2020-12-02 23:08:05 +00:00
2020-09-01 03:23:17 +00:00
2020-12-01 21:48:20 +00:00
*** Keywords ***
2020-09-01 03:23:17 +00:00
2022-05-26 09:44:13 +00:00
Validate Object Copies
[Arguments] ${WALLET} ${POLICY} ${EXPECTED_COPIES}
${FILE}
... ${_} = Generate file ${SIMPLE_OBJ_SIZE}
${CID} = Create container ${WALLET} rule=${POLICY}
${OID} = Put object ${WALLET} ${FILE} ${CID}
${COPIES} = Get Simple Object Copies ${WALLET} ${CID} ${OID}
Should Be Equal As Numbers ${EXPECTED_COPIES} ${COPIES}
[Return] ${CID} ${OID}
2021-04-26 10:30:40 +00:00
2022-05-26 09:44:13 +00:00
Validate Selected Nodes
[Arguments] ${WALLET} ${POLICY} ${EXPECTED_COPIES} @{EXPECTED_NODES}
2020-11-27 00:33:11 +00:00
2022-05-26 09:44:13 +00:00
${CID}
... ${OID} = Validate Object Copies ${WALLET} ${POLICY} ${EXPECTED_COPIES}
${NODES} = Get Nodes With Object ${WALLET} ${CID} ${OID}
Lists Should Be Equal ${EXPECTED_NODES} ${NODES}