Skip to content

Commit 8ab3202

Browse files
committed
fix: use the mcp user CM for the its tests
Signed-off-by: fege <fmosca@redhat.com>
1 parent a84ef19 commit 8ab3202

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

tests/model_registry/conftest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from tests.model_registry.constants import (
2626
DB_BASE_RESOURCES_NAME,
2727
DB_RESOURCE_NAME,
28-
DEFAULT_CUSTOM_MODEL_CATALOG,
28+
DEFAULT_MCP_CATALOG_CM,
2929
KUBERBACPROXY_STR,
3030
MR_INSTANCE_BASE_NAME,
3131
MR_INSTANCE_NAME,
@@ -493,15 +493,15 @@ def mcp_servers_configmap_patch(
493493
model_registry_rest_headers: dict[str, str],
494494
) -> Generator[None]:
495495
"""
496-
Class-scoped fixture that patches the model-catalog-sources ConfigMap.
496+
Class-scoped fixture that patches the mcp-catalog-sources ConfigMap.
497497
498498
Sets two keys in the ConfigMap data:
499499
- sources.yaml: catalog source definition pointing to the MCP servers YAML,
500500
plus named queries for filtering by custom properties
501501
- mcp-servers.yaml: the actual MCP server definitions
502502
"""
503503
catalog_config_map = ConfigMap(
504-
name=DEFAULT_CUSTOM_MODEL_CATALOG,
504+
name=DEFAULT_MCP_CATALOG_CM,
505505
client=admin_client,
506506
namespace=model_registry_namespace,
507507
)

tests/model_registry/constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ class ModelRegistryEndpoints:
6767
}
6868
MODEL_REGISTRY_POD_FILTER: str = "component=model-registry"
6969
DEFAULT_CUSTOM_MODEL_CATALOG: str = "model-catalog-sources"
70+
DEFAULT_MCP_CATALOG_CM: str = "mcp-catalog-sources"
7071
SAMPLE_MODEL_NAME1 = "mistralai/Mistral-7B-Instruct-v0.3"
7172
CUSTOM_CATALOG_ID1: str = "sample_custom_catalog1"
7273
DEFAULT_MODEL_CATALOG_CM: str = "model-catalog-default-sources"

tests/model_registry/mcp_servers/config/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def mcp_multi_source_configmap_patch(
3535
model_registry_rest_headers: dict[str, str],
3636
) -> Generator[None]:
3737
"""
38-
Class-scoped fixture that patches the model-catalog-sources ConfigMap
38+
Class-scoped fixture that patches the mcp-catalog-sources ConfigMap
3939
with two MCP catalog sources pointing to two different YAML files.
4040
"""
4141
catalog_config_map, current_data = get_mcp_catalog_sources(

tests/model_registry/mcp_servers/config/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
from kubernetes.dynamic import DynamicClient
33
from ocp_resources.config_map import ConfigMap
44

5-
from tests.model_registry.constants import DEFAULT_CUSTOM_MODEL_CATALOG
5+
from tests.model_registry.constants import DEFAULT_MCP_CATALOG_CM
66

77

88
def get_mcp_catalog_sources(admin_client: DynamicClient, model_registry_namespace: str) -> tuple[ConfigMap, dict]:
9-
"""Return the catalog ConfigMap and its parsed sources.yaml data."""
9+
"""Return the MCP catalog ConfigMap and its parsed sources.yaml data."""
1010
catalog_config_map = ConfigMap(
11-
name=DEFAULT_CUSTOM_MODEL_CATALOG,
11+
name=DEFAULT_MCP_CATALOG_CM,
1212
client=admin_client,
1313
namespace=model_registry_namespace,
1414
)

tests/model_registry/mcp_servers/constants.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
MCP_CATALOG_SOURCE_ID: str = "test_mcp_servers"
44
MCP_CATALOG_SOURCE_NAME: str = "Test MCP Servers"
55
MCP_CATALOG_API_PATH: str = "/api/mcp_catalog/v1alpha1/"
6-
MCP_SERVERS_YAML_CATALOG_PATH: str = "/data/user-sources/mcp-servers.yaml"
6+
MCP_SERVERS_YAML_CATALOG_PATH: str = "/data/user-mcp-sources/mcp-servers.yaml"
77

88
MCP_SERVERS_YAML: str = """\
99
mcp_servers:
@@ -86,7 +86,7 @@
8686

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

9191
MCP_SERVERS_YAML2: str = """\
9292
mcp_servers:
@@ -136,7 +136,7 @@
136136

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

141141
MCP_SERVERS_YAML_MALFORMED: str = """\
142142
mcp_servers:

0 commit comments

Comments
 (0)