add 2 cases for test object lock #80
No reviewers
Labels
No labels
P0
P1
P2
P3
good first issue
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-testcases#80
Loading…
Reference in a new issue
No description provided.
Delete branch ":feature-2"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -127,2 +127,4 @@
@wait_for_success(datetime_utils.parse_time(STORAGE_GC_TIME))
def check_object_not_found(wallet_file_path:str, cid: str, oid: str, shell: Shell, default_rpc_endpoint: str):
can use StorageObjectInfo here instead of multiple single params
also
default_rpc_endpoint
should be justrpc_endpoint
here@ -659,2 +664,4 @@
self.cluster.default_rpc_endpoint,
)
@allure.title("Expired object should be removes after relocks")
Expired object should be removed after all locks were expired
@ -661,0 +678,4 @@
):
allure.dynamic.title(
f"Expired object should be removes after relocks are expired for {request.node.callspec.id}"
Same title correction :)
@ -661,0 +694,4 @@
expire_at=current_epoch + 3,
)
def check_lock_object(lock_object_id: str):
We can move it near
check_object_not_found
(for better test readability)Also, the logic can be made simplier
@ -661,0 +684,4 @@
current_epoch = self.ensure_fresh_epoch()
storage_object = user_container.generate_object(object_size, expire_at=current_epoch + 1)
with allure.step("Lock object for couple epochs"):
We may be more specific here
"Apply first lock to object for 3 epochs"
@ -661,0 +713,4 @@
self.tick_epochs(2)
with allure.step("Check previous lock"):
"Check first lock is still available"
@ -661,0 +716,4 @@
with allure.step("Check previous lock"):
check_lock_object(lock_object_id_0)
with allure.step("Lock object for couple epochs"):
"Apply second lock to object for 3 more epochs"
@ -661,0 +728,4 @@
self.tick_epochs(2)
with allure.step("Check previous locks"):
Separate to 2 steps:
Verify first lock is expired and removed
Verify second lock is still available
@ -661,0 +736,4 @@
self.cluster.default_rpc_endpoint)
check_lock_object(lock_object_id_1)
with allure.step("Lock object for couple epochs"):
"Apply third lock to object for 3 more epochs"
@ -661,0 +746,4 @@
expire_at=current_epoch + 7,
)
with allure.step("Wait for object to be deleted"):
"Verify object is deleted after all locks are expired"
@ -661,0 +755,4 @@
self.cluster.default_rpc_endpoint)
@allure.title("Expired two objects with one lock should be deleted after locks")
Two expired objects with one lock should be deleted after lock expiration
@ -661,0 +783,4 @@
self.tick_epoch()
with allure.step("Lock object for couple epochs"):
Lock objects for 4(? please use correct number) epochs
@ -661,0 +793,4 @@
expire_at=current_epoch + 4,
)
with allure.step("Check object is available at expiration time"):
Verify objects are available during next three epochs
@ -661,0 +807,4 @@
self.cluster.default_rpc_endpoint,
)
with allure.step("Wait for object to be deleted"):
"Verify objects are deleted after lock was expired"
@ -661,0 +817,4 @@
self.cluster.default_rpc_endpoint)
Redundant new lines (must be one in the end of file)
@ -661,0 +759,4 @@
@pytest.mark.parametrize(
"object_size",
[pytest.lazy_fixture("simple_object_size"), pytest.lazy_fixture("complex_object_size")],
ids=["simple object", "complex object"],
simple object size
andcomplex object size
everywhere :)@ -661,0 +674,4 @@
self,
request: FixtureRequest,
user_container: StorageContainer,
object_size: int,
object_size: int
->object_size: ObjectSize
everywhere9d9a30b593
to8ad8e501c1
8ad8e501c1
tod74b483baa
d74b483baa
to69cec608a6
Closes #29