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
|
|
|
|
|
|
|
|
${WALLET} ${OWNER} ${OWNER_KEY} = Prepare Wallet And Deposit
|
|
|
|
${GEN_WALLET} ${GEN} ${GEN_KEY} = Init Wallet with Address ${ASSETS_DIR}
|
|
|
|
|
|
|
|
${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}
|
|
|
|
|
2021-12-16 06:51:26 +00:00
|
|
|
${CID} = Create Container ${GEN_KEY} ${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}
|
|
|
|
... Container Existing ${OWNER_KEY} ${CID}
|
|
|
|
Run Keyword And Expect Error *
|
|
|
|
... Container Existing ${GEN_KEY} ${CID}
|
|
|
|
|
|
|
|
########################
|
|
|
|
# Check container owner
|
|
|
|
########################
|
|
|
|
|
|
|
|
${CONTAINER_INFO} = Run Process ${NEOFS_CLI_EXEC} container get --cid ${CID} --wif ${GEN_KEY} --rpc-endpoint ${NEOFS_ENDPOINT} shell=True
|
|
|
|
${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
|