Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/model_registry/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from tests.model_registry.constants import (
DB_BASE_RESOURCES_NAME,
DB_RESOURCE_NAME,
DEFAULT_CUSTOM_MODEL_CATALOG,
DEFAULT_MCP_CATALOG_CM,
KUBERBACPROXY_STR,
MR_INSTANCE_BASE_NAME,
MR_INSTANCE_NAME,
Expand Down Expand Up @@ -493,15 +493,15 @@ def mcp_servers_configmap_patch(
model_registry_rest_headers: dict[str, str],
) -> Generator[None]:
"""
Class-scoped fixture that patches the model-catalog-sources ConfigMap.
Class-scoped fixture that patches the mcp-catalog-sources ConfigMap.

Sets two keys in the ConfigMap data:
- sources.yaml: catalog source definition pointing to the MCP servers YAML,
plus named queries for filtering by custom properties
- mcp-servers.yaml: the actual MCP server definitions
"""
catalog_config_map = ConfigMap(
name=DEFAULT_CUSTOM_MODEL_CATALOG,
name=DEFAULT_MCP_CATALOG_CM,
client=admin_client,
namespace=model_registry_namespace,
)
Expand Down
1 change: 1 addition & 0 deletions tests/model_registry/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class ModelRegistryEndpoints:
}
MODEL_REGISTRY_POD_FILTER: str = "component=model-registry"
DEFAULT_CUSTOM_MODEL_CATALOG: str = "model-catalog-sources"
DEFAULT_MCP_CATALOG_CM: str = "mcp-catalog-sources"
SAMPLE_MODEL_NAME1 = "mistralai/Mistral-7B-Instruct-v0.3"
CUSTOM_CATALOG_ID1: str = "sample_custom_catalog1"
DEFAULT_MODEL_CATALOG_CM: str = "model-catalog-default-sources"
Expand Down
2 changes: 1 addition & 1 deletion tests/model_registry/mcp_servers/config/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def mcp_multi_source_configmap_patch(
model_registry_rest_headers: dict[str, str],
) -> Generator[None]:
"""
Class-scoped fixture that patches the model-catalog-sources ConfigMap
Class-scoped fixture that patches the mcp-catalog-sources ConfigMap
with two MCP catalog sources pointing to two different YAML files.
"""
catalog_config_map, current_data = get_mcp_catalog_sources(
Expand Down
6 changes: 3 additions & 3 deletions tests/model_registry/mcp_servers/config/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
from kubernetes.dynamic import DynamicClient
from ocp_resources.config_map import ConfigMap

from tests.model_registry.constants import DEFAULT_CUSTOM_MODEL_CATALOG
from tests.model_registry.constants import DEFAULT_MCP_CATALOG_CM


def get_mcp_catalog_sources(admin_client: DynamicClient, model_registry_namespace: str) -> tuple[ConfigMap, dict]:
"""Return the catalog ConfigMap and its parsed sources.yaml data."""
"""Return the MCP catalog ConfigMap and its parsed sources.yaml data."""
catalog_config_map = ConfigMap(
name=DEFAULT_CUSTOM_MODEL_CATALOG,
name=DEFAULT_MCP_CATALOG_CM,
client=admin_client,
namespace=model_registry_namespace,
)
Expand Down
6 changes: 3 additions & 3 deletions tests/model_registry/mcp_servers/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
MCP_CATALOG_SOURCE_ID: str = "test_mcp_servers"
MCP_CATALOG_SOURCE_NAME: str = "Test MCP Servers"
MCP_CATALOG_API_PATH: str = "/api/mcp_catalog/v1alpha1/"
MCP_SERVERS_YAML_CATALOG_PATH: str = "/data/user-sources/mcp-servers.yaml"
MCP_SERVERS_YAML_CATALOG_PATH: str = "/data/user-mcp-sources/mcp-servers.yaml"

MCP_SERVERS_YAML: str = """\
mcp_servers:
Expand Down Expand Up @@ -86,7 +86,7 @@

MCP_CATALOG_SOURCE2_ID: str = "test_mcp_servers_2"
MCP_CATALOG_SOURCE2_NAME: str = "Test MCP Servers 2"
MCP_SERVERS_YAML2_CATALOG_PATH: str = "/data/user-sources/mcp-servers-2.yaml"
MCP_SERVERS_YAML2_CATALOG_PATH: str = "/data/user-mcp-sources/mcp-servers-2.yaml"

MCP_SERVERS_YAML2: str = """\
mcp_servers:
Expand Down Expand Up @@ -136,7 +136,7 @@

MCP_CATALOG_INVALID_SOURCE_ID: str = "test_mcp_servers_invalid"
MCP_CATALOG_INVALID_SOURCE_NAME: str = "Test MCP Servers Invalid"
MCP_SERVERS_YAML_INVALID_CATALOG_PATH: str = "/data/user-sources/mcp-servers-invalid.yaml"
MCP_SERVERS_YAML_INVALID_CATALOG_PATH: str = "/data/user-mcp-sources/mcp-servers-invalid.yaml"

MCP_SERVERS_YAML_MALFORMED: str = """\
mcp_servers:
Expand Down