diff --git a/ydb/tests/functional/serverless/test_serverless.py b/ydb/tests/functional/serverless/test_serverless.py index ec393b5d936c..424d38c11b26 100644 --- a/ydb/tests/functional/serverless/test_serverless.py +++ b/ydb/tests/functional/serverless/test_serverless.py @@ -590,6 +590,24 @@ def list_endpoints(database): assert_that(serverless_db_endpoints, contains_inanyorder(*hostel_db_endpoints)) +def test_discovery_with_inner_path(ydb_hostel_db, ydb_serverless_db, ydb_endpoint): + driver_config = ydb.DriverConfig( + ydb_endpoint, + ydb_serverless_db + ) + + driver = ydb.Driver(driver_config) + driver.wait(120) + + serverless_inner_path = os.path.join(ydb_serverless_db, "dirA0") + driver.scheme_client.make_directory(serverless_inner_path) + + logger.debug("List endpoints of '%s' by path '%s'", ydb_serverless_db, serverless_inner_path) + resolver = ydb.DiscoveryEndpointsResolver(ydb.DriverConfig(ydb_endpoint, serverless_inner_path)) + result = resolver.resolve() + assert_that(result.endpoints, not_none()) + + def ydbcli_db_schema_exec(cluster, operation_proto): endpoint = f'{cluster.nodes[1].host}:{cluster.nodes[1].port}' args = [