2023-11-24 10:22:00 +00:00
|
|
|
import os
|
2023-05-31 15:31:35 +00:00
|
|
|
from datetime import datetime
|
|
|
|
|
|
|
|
import allure
|
|
|
|
import pytest
|
2023-11-27 10:03:18 +00:00
|
|
|
from frostfs_testlib.storage.cluster import ClusterNode
|
2023-05-31 15:31:35 +00:00
|
|
|
from frostfs_testlib.storage.controllers import ShardsWatcher
|
2023-11-24 10:22:00 +00:00
|
|
|
from frostfs_testlib.storage.dataclasses.object_size import ObjectSize
|
2024-06-18 10:00:56 +00:00
|
|
|
from frostfs_testlib.utils.file_utils import TestFile, generate_file
|
2023-05-31 15:31:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture()
|
|
|
|
@allure.title("Provide Shards watcher")
|
|
|
|
def shards_watcher(node_under_test: ClusterNode) -> ShardsWatcher:
|
|
|
|
watcher = ShardsWatcher(node_under_test)
|
|
|
|
return watcher
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture()
|
|
|
|
@allure.title("Test start time")
|
|
|
|
def test_start_time() -> datetime:
|
|
|
|
start_time = datetime.utcnow()
|
|
|
|
return start_time
|
2023-11-24 10:22:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture()
|
|
|
|
@allure.title("Generate simple size file")
|
2024-06-18 10:00:56 +00:00
|
|
|
def simple_file(simple_object_size: ObjectSize) -> TestFile:
|
2023-11-24 10:22:00 +00:00
|
|
|
path_file = generate_file(size=simple_object_size.value)
|
2024-06-18 10:00:56 +00:00
|
|
|
return path_file
|