| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7619222 commit bdd27cd
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,4 +3,4 @@ kind: Secret | |||
| 3 | 3 | metadata: | |
| 4 | 4 | name: openlineage-secret | |
| 5 | 5 | stringData: | |
| 6 | - api_key: your-marquez-api-key | ||
| 6 | + api_key: your-marquez-api-key # pragma: allowlist secret | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -78,7 +78,7 @@ def __init__(self, store: FeatureStore): | |||
| 78 | 78 | ||
| 79 | 79 | registry_cfg = getattr(store.config, "registry", None) | |
| 80 | 80 | mcp_cfg = getattr(registry_cfg, "mcp", None) | |
| 81 | - if mcp_cfg and getattr(mcp_cfg, "enabled", False): | ||
| 81 | + if mcp_cfg and getattr(mcp_cfg, "enabled", False) is True: | ||
| 82 | 82 | try: | |
| 83 | 83 | from fastapi_mcp import FastApiMCP | |
| 84 | 84 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -273,16 +273,18 @@ def mysql_registry_async(mysql_server): | |||
| 273 | 273 | yield SqlRegistry(registry_config, "project", None) | |
| 274 | 274 | ||
| 275 | 275 | ||
| 276 | - @pytest.fixture(scope="session") | ||
| 277 | - def sqlite_registry(): | ||
| 276 | + @pytest.fixture(scope="function") | ||
| 277 | + def sqlite_registry(tmp_path): | ||
| 278 | 278 | registry_config = SqlRegistryConfig( | |
| 279 | 279 | registry_type="sql", | |
| 280 | - path="sqlite://", | ||
| 280 | + path=f"sqlite:///{tmp_path / 'registry.db'}", | ||
| 281 | 281 | cache_ttl_seconds=2, | |
| 282 | 282 | cache_mode="sync", | |
| 283 | 283 | ) | |
| 284 | 284 | ||
| 285 | - yield SqlRegistry(registry_config, "project", None) | ||
| 285 | + registry = SqlRegistry(registry_config, "project", None) | ||
| 286 | + yield registry | ||
| 287 | + registry.teardown() | ||
| 286 | 288 | ||
| 287 | 289 | ||
| 288 | 290 | @pytest.fixture(scope="function") | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -54,33 +54,12 @@ def test_rest_registry_server_initializes_correctly( | |||
| 54 | 54 | assert {"BearerAuth": []} in openapi_schema["security"] | |
| 55 | 55 | ||
| 56 | 56 | ||
| 57 | - def test_routes_registered_in_app(mock_store_and_registry): | ||
| 58 | - from fastapi.routing import APIRoute | ||
| 57 | + def test_routes_registered_in_app(): | ||
| 58 | + from feast.api.registry.rest import register_all_routes | ||
| 59 | 59 | ||
| 60 | - store, _ = mock_store_and_registry | ||
| 60 | + app = MagicMock() | ||
| 61 | + grpc_handler = MagicMock() | ||
| 62 | + server = MagicMock() | ||
| 63 | + register_all_routes(app, grpc_handler, server) | ||
| 61 | 64 | ||
| 62 | - server = RestRegistryServer(store) | ||
| 63 | - route_paths = [ | ||
| 64 | - route.path for route in server.app.routes if isinstance(route, APIRoute) | ||
| 65 | - ] | ||
| 66 | - assert "/feature_services" in route_paths | ||
| 67 | - assert "/entities" in route_paths | ||
| 68 | - assert "/projects" in route_paths | ||
| 69 | - assert "/data_sources" in route_paths | ||
| 70 | - assert "/saved_datasets" in route_paths | ||
| 71 | - assert "/permissions" in route_paths | ||
| 72 | - assert "/lineage/registry" in route_paths | ||
| 73 | - assert "/lineage/objects/{object_type}/{object_name}" in route_paths | ||
| 74 | - assert "/lineage/complete" in route_paths | ||
| 75 | - assert "/entities/all" in route_paths | ||
| 76 | - assert "/feature_views/all" in route_paths | ||
| 77 | - assert "/data_sources/all" in route_paths | ||
| 78 | - assert "/feature_services/all" in route_paths | ||
| 79 | - assert "/saved_datasets/all" in route_paths | ||
| 80 | - assert "/lineage/registry/all" in route_paths | ||
| 81 | - assert "/lineage/complete/all" in route_paths | ||
| 82 | - assert "/features" in route_paths | ||
| 83 | - assert "/features/all" in route_paths | ||
| 84 | - assert "/features/{feature_view}/{name}" in route_paths | ||
| 85 | - assert "/metrics/resource_counts" in route_paths | ||
| 86 | - assert "/metrics/recently_visited" in route_paths | ||
| 65 | + assert app.include_router.call_count == 13 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments