2021-11-03 12:48:31 +00:00
|
|
|
*** Settings ***
|
2021-12-09 10:58:51 +00:00
|
|
|
Variables common.py
|
|
|
|
Variables wellknown_acl.py
|
2021-11-03 12:48:31 +00:00
|
|
|
|
|
|
|
Resource setup_teardown.robot
|
|
|
|
Resource payment_operations.robot
|
|
|
|
|
2021-12-09 10:58:51 +00:00
|
|
|
Library Process
|
|
|
|
Library neofs.py
|
|
|
|
Library String
|
|
|
|
Library OperatingSystem
|
2021-11-03 12:48:31 +00:00
|
|
|
|
|
|
|
*** Variables ***
|
|
|
|
${SIGNED_FILE} = ${ASSETS_DIR}/signed_token.json
|
|
|
|
|
|
|
|
*** Test Cases ***
|
|
|
|
|
|
|
|
Session Token for Container
|
|
|
|
[Documentation] Testcase to check container session token
|
|
|
|
[Tags] Container SessionToken
|
|
|
|
[Timeout] 5 min
|
|
|
|
|
|
|
|
[Setup] Setup
|
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
${WALLET} ${OWNER} ${_} = Prepare Wallet And Deposit
|
|
|
|
${GEN_WALLET} ${GEN} ${_} = Prepare Wallet And Deposit
|
2021-11-03 12:48:31 +00:00
|
|
|
|
|
|
|
${UTIL} = Run Process ${NEOGO_EXECUTABLE} wallet dump-keys -w ${GEN_WALLET} shell=True
|
|
|
|
${PUB_PART} = Get Line ${UTIL.stdout} 1
|
|
|
|
|
|
|
|
${SESSION_TOKEN} = Generate Session Token ${OWNER} ${PUB_PART} wildcard=True
|
|
|
|
|
|
|
|
Sign Session token ${SESSION_TOKEN} ${WALLET} ${SIGNED_FILE}
|
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
${CID} = Create Container ${GEN_WALLET} ${PRIVATE_ACL_F} ${COMMON_PLACEMENT_RULE} ${EMPTY} ${SIGNED_FILE}
|
2021-11-03 12:48:31 +00:00
|
|
|
Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL}
|
2022-02-01 13:42:41 +00:00
|
|
|
... Container Existing ${WALLET} ${CID}
|
2021-11-03 12:48:31 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Container Existing ${GEN_WALLET} ${CID}
|
2021-11-03 12:48:31 +00:00
|
|
|
|
|
|
|
########################
|
|
|
|
# Check container owner
|
|
|
|
########################
|
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
${CONTAINER_INFO} = Run Process ${NEOFS_CLI_EXEC} container get --cid ${CID} --wallet ${GEN_WALLET} --config ${WALLET_PASS} --rpc-endpoint ${NEOFS_ENDPOINT} shell=True
|
2021-11-03 12:48:31 +00:00
|
|
|
${CID_OWNER_ID_LINE} = Get Line ${CONTAINER_INFO.stdout} 2
|
|
|
|
@{CID_OWNER_ID} = Split String ${CID_OWNER_ID_LINE}
|
|
|
|
Should Be Equal As Strings ${OWNER} ${CID_OWNER_ID}[2]
|
|
|
|
|
|
|
|
[Teardown] Teardown container_session_token
|