[#232] add test object metrics

This commit is contained in:
Ilyas Niyazov 2024-05-23 10:33:20 +03:00 committed by Andrey Berezin
parent a5ee580345
commit bcb1234766
2 changed files with 324 additions and 2 deletions

View file

@ -23,7 +23,7 @@ from frostfs_testlib.resources.common import (
)
from frostfs_testlib.s3 import AwsCliClient, Boto3ClientWrapper, S3ClientWrapper, VersioningStatus
from frostfs_testlib.shell import LocalShell, Shell
from frostfs_testlib.steps.cli.container import DEFAULT_PLACEMENT_RULE, DEFAULT_EC_PLACEMENT_RULE
from frostfs_testlib.steps.cli.container import DEFAULT_EC_PLACEMENT_RULE, DEFAULT_PLACEMENT_RULE
from frostfs_testlib.steps.cli.object import get_netmap_netinfo
from frostfs_testlib.steps.s3 import s3_helper
from frostfs_testlib.storage import get_service_registry
@ -210,6 +210,7 @@ def object_size(
return complex_object_size
@pytest.fixture(scope="session")
def rep_placement_policy() -> PlacementPolicy:
return PlacementPolicy("rep", DEFAULT_PLACEMENT_RULE)
@ -234,6 +235,7 @@ def placement_policy(
return ec_placement_policy
@pytest.fixture(scope="session")
def cluster(temp_directory: str, hosting: Hosting, client_shell: Shell) -> Cluster:
cluster = Cluster(hosting)
@ -266,10 +268,12 @@ def healthcheck(cluster: Cluster) -> Healthcheck:
return healthcheck_cls()
@pytest.fixture(scope="session")
@pytest.fixture
def cluster_state_controller(client_shell: Shell, cluster: Cluster, healthcheck: Healthcheck) -> ClusterStateController:
controller = ClusterStateController(client_shell, cluster, healthcheck)
yield controller
controller.start_stopped_hosts()
controller.start_all_stopped_services()
@pytest.fixture(scope="session")