forked from TrueCloudLab/frostfs-testcases
[#157] Move fixture
Signed-off-by: Dmitriy Zayakin <d.zayakin@yadro.com>
This commit is contained in:
parent
858ca71e40
commit
553fb1ec50
2 changed files with 10 additions and 10 deletions
|
@ -1,5 +1,6 @@
|
|||
import logging
|
||||
import os
|
||||
import random
|
||||
import shutil
|
||||
from datetime import datetime, timedelta, timezone
|
||||
from importlib.metadata import entry_points
|
||||
|
@ -382,3 +383,11 @@ def auth_container_placement_policy(cluster: Cluster, request: pytest.FixtureReq
|
|||
for key, value in placeholders.items():
|
||||
placement_policy = placement_policy.replace(key, str(value))
|
||||
return placement_policy
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
@allure.title("Select random node for testing")
|
||||
def node_under_test(cluster: Cluster) -> ClusterNode:
|
||||
selected_node = random.choice(cluster.cluster_nodes)
|
||||
allure.attach(f"{selected_node}", "Selected node", allure.attachment_type.TEXT)
|
||||
return selected_node
|
||||
|
|
|
@ -1,23 +1,14 @@
|
|||
import os
|
||||
import random
|
||||
from datetime import datetime
|
||||
|
||||
import allure
|
||||
import pytest
|
||||
from frostfs_testlib.storage.cluster import Cluster, ClusterNode
|
||||
from frostfs_testlib.storage.cluster import ClusterNode
|
||||
from frostfs_testlib.storage.controllers import ShardsWatcher
|
||||
from frostfs_testlib.storage.dataclasses.object_size import ObjectSize
|
||||
from frostfs_testlib.utils.file_utils import generate_file
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
@allure.title("Select random node for testing")
|
||||
def node_under_test(cluster: Cluster) -> ClusterNode:
|
||||
selected_node = random.choice(cluster.cluster_nodes)
|
||||
allure.attach(f"{selected_node}", "Selected node", allure.attachment_type.TEXT)
|
||||
return selected_node
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
@allure.title("Provide Shards watcher")
|
||||
def shards_watcher(node_under_test: ClusterNode) -> ShardsWatcher:
|
||||
|
|
Loading…
Reference in a new issue