diff --git a/src/frostfs_testlib/storage/cluster.py b/src/frostfs_testlib/storage/cluster.py index b67e34d..7110038 100644 --- a/src/frostfs_testlib/storage/cluster.py +++ b/src/frostfs_testlib/storage/cluster.py @@ -161,17 +161,24 @@ class Cluster: This class represents a Cluster object for the whole storage based on provided hosting """ - default_rpc_endpoint: str - default_s3_gate_endpoint: str - default_http_gate_endpoint: str + default_rpc_endpoint: str = "not deployed" + default_s3_gate_endpoint: str = "not deployed" + default_http_gate_endpoint: str = "not deployed" def __init__(self, hosting: Hosting) -> None: self._hosting = hosting self.class_registry = get_service_registry() - self.default_rpc_endpoint = self.services(StorageNode)[0].get_rpc_endpoint() - self.default_s3_gate_endpoint = self.services(S3Gate)[0].get_endpoint() - self.default_http_gate_endpoint = self.services(HTTPGate)[0].get_endpoint() + + storage = self.services(StorageNode) + if storage: + self.default_rpc_endpoint = storage[0].get_rpc_endpoint() + s3gate = self.services(S3Gate) + if s3gate: + self.default_s3_gate_endpoint = s3gate[0].get_endpoint() + http_gate = self.services(HTTPGate) + if http_gate: + self.default_http_gate_endpoint = http_gate[0].get_endpoint() @property def hosts(self) -> list[Host]: