2021-08-25 15:18:26 +00:00
|
|
|
*** Settings ***
|
2021-12-09 10:58:51 +00:00
|
|
|
Variables common.py
|
2021-08-25 15:18:26 +00:00
|
|
|
|
2022-04-25 09:53:20 +00:00
|
|
|
Library container.py
|
|
|
|
Library Collections
|
2021-08-25 15:18:26 +00:00
|
|
|
|
2021-09-27 20:41:21 +00:00
|
|
|
Resource setup_teardown.robot
|
|
|
|
Resource payment_operations.robot
|
2021-08-25 15:18:26 +00:00
|
|
|
|
2022-07-04 19:49:14 +00:00
|
|
|
*** Variables ***
|
|
|
|
# The timeout during which the container should be deleted. The deletion after
|
|
|
|
# this time isn't guaranteed, but is expected as we run the test in an
|
|
|
|
# isolated environment.
|
|
|
|
${DELETE_TIMEOUT} = 30s
|
|
|
|
|
|
|
|
|
2021-08-25 15:18:26 +00:00
|
|
|
*** Test Cases ***
|
|
|
|
Delete Containers
|
2022-04-25 09:53:20 +00:00
|
|
|
[Documentation] Testcase to check if containers can be deleted by its owner only.
|
2022-03-15 11:58:59 +00:00
|
|
|
[Tags] Container
|
2022-07-04 19:49:14 +00:00
|
|
|
[Timeout] 3 min
|
2021-08-25 15:18:26 +00:00
|
|
|
|
2021-12-16 06:51:26 +00:00
|
|
|
[Setup] Setup
|
2021-08-25 15:18:26 +00:00
|
|
|
|
2022-07-04 19:49:14 +00:00
|
|
|
${WALLET}
|
|
|
|
... ${_}
|
|
|
|
... ${_} = Prepare Wallet And Deposit
|
|
|
|
${ANOTHER_WALLET}
|
|
|
|
... ${_}
|
|
|
|
... ${_} = Prepare Wallet And Deposit
|
2021-08-25 15:18:26 +00:00
|
|
|
|
2022-07-04 19:49:14 +00:00
|
|
|
${CID} = Create container ${WALLET}
|
2021-08-25 15:18:26 +00:00
|
|
|
|
2021-12-16 06:51:26 +00:00
|
|
|
################################################################
|
|
|
|
# No explicit error is expected upon container deletion attempt
|
|
|
|
################################################################
|
2022-07-04 19:49:14 +00:00
|
|
|
Delete Container ${ANOTHER_WALLET} ${CID}
|
|
|
|
Sleep ${DELETE_TIMEOUT}
|
|
|
|
@{CONTAINERS} = List Containers ${WALLET}
|
2022-04-25 09:53:20 +00:00
|
|
|
List Should Contain Value
|
|
|
|
... ${CONTAINERS}
|
|
|
|
... ${CID}
|
|
|
|
... msg="A key which doesn't owe the container is able to delete ${CID}"
|
2021-08-25 15:18:26 +00:00
|
|
|
|
2022-07-04 19:49:14 +00:00
|
|
|
Delete Container ${WALLET} ${CID}
|
|
|
|
Sleep ${DELETE_TIMEOUT}
|
|
|
|
@{CONTAINERS} = List Containers ${WALLET}
|
2022-04-25 09:53:20 +00:00
|
|
|
List Should Not Contain Value
|
|
|
|
... ${CONTAINERS}
|
|
|
|
... ${CID}
|
|
|
|
... msg="${CID} is still in container list"
|
|
|
|
|
|
|
|
###################################################################################
|
|
|
|
# If one tries to delete an already deleted container, they should expect success.
|
|
|
|
###################################################################################
|
2022-07-04 19:49:14 +00:00
|
|
|
Delete Container ${WALLET} ${CID}
|
2022-04-25 09:53:20 +00:00
|
|
|
|
|
|
|
[Teardown] Teardown container_delete
|