Added method get s3 endpoint for namespace #287

Merged
i.niyazov merged 1 commit from i.niyazov/frostfs-testlib:add-s3-ns-endpoints into master 2024-09-10 14:05:45 +00:00
2 changed files with 4 additions and 0 deletions

View file

@ -12,6 +12,7 @@ class ConfigAttributes:
REMOTE_WALLET_CONFIG = "remote_wallet_config_path"
ENDPOINT_DATA_0 = "endpoint_data0"
ENDPOINT_DATA_1 = "endpoint_data1"
ENDPOINT_DATA_0_NS = "endpoint_data0_namespace"
ENDPOINT_INTERNAL = "endpoint_internal0"
ENDPOINT_PROMETHEUS = "endpoint_prometheus"
CONTROL_ENDPOINT = "control_endpoint"

View file

@ -45,6 +45,9 @@ class S3Gate(NodeBase):
self._get_attribute(ConfigAttributes.ENDPOINT_DATA_1),
]
def get_ns_endpoint(self, ns_name: str) -> str:
return self._get_attribute(ConfigAttributes.ENDPOINT_DATA_0_NS).format(namespace=ns_name)
def service_healthcheck(self) -> bool:
health_metric = "frostfs_s3_gw_state_health"
output = self.host.get_shell().exec(f"curl -s localhost:8086 | grep {health_metric} | sed 1,2d").stdout