Skip to content

Commit f731b23

Browse files
authored
Merge branch 'main' into pre-commit-ci-update-config
2 parents 57b93ba + 6237646 commit f731b23

File tree

51 files changed

+709
-137
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+709
-137
lines changed

OWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ approvers:
33
- fege
44
- jgarciao
55
- lugi0
6+
- mwaykole
67
reviewers:
78
- dbasunag
89
- fege
910
- jgarciao
1011
- lugi0
12+
- mwaykole

docs/GETTING_STARTED.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ To run tests with admin client only, pass `--tc=use_unprivileged_client:False` t
138138
### jira integration
139139

140140
To skip running tests which have open bugs, [pytest_jira](https://github.com/rhevm-qe-automation/pytest_jira) plugin is used.
141-
To run tests with jira integration, you need to set `PYTEST_JIRA_URL` and `PYTEST_JIRA_TOKEN` environment variables.
141+
To run tests with jira integration, you need to set `PYTEST_JIRA_URL`, `PYTEST_JIRA_USERNAME` and `PYTEST_JIRA_PASSWORD` environment variables.
142142
To make a test with jira marker, add: `@pytest.mark.jira(jira_id="RHOAIENG-0000", run=False)` to the test.
143143

144144
### Running containerized tests

tests/model_registry/mcp_servers/config/test_invalid_yaml.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
)
3838
@pytest.mark.usefixtures("mcp_invalid_yaml_configmap_patch")
3939
class TestMCPServerInvalidYAML:
40-
"""RHOAIENG-51582: Tests for graceful handling of invalid YAML sources (TC-LOAD-007, TC-LOAD-008)."""
40+
"""
41+
Tests for graceful handling of invalid YAML sources (TC-LOAD-007, TC-LOAD-008)."""
4142

4243
def test_valid_servers_loaded_despite_invalid_source(
4344
self: Self,

tests/model_registry/mcp_servers/config/test_multi_source.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
@pytest.mark.usefixtures("mcp_multi_source_configmap_patch")
1515
class TestMCPServerMultiSource:
16-
"""RHOAIENG-51582: Tests for loading MCP servers from multiple YAML sources (TC-LOAD-002)."""
16+
"""Tests for loading MCP servers from multiple YAML sources (TC-LOAD-002)."""
1717

1818
def test_all_servers_from_multiple_sources_loaded(
1919
self: Self,

tests/model_registry/mcp_servers/config/test_named_queries.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
@pytest.mark.usefixtures("mcp_servers_configmap_patch")
1313
class TestMCPServerNamedQueries:
14-
"""RHOAIENG-52375: Tests for MCP server named query functionality."""
14+
"""Tests for MCP server named query functionality."""
1515

1616
@pytest.mark.parametrize(
1717
"named_query, expected_custom_properties",

tests/model_registry/mcp_servers/search/test_filtering.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
@pytest.mark.usefixtures("mcp_servers_configmap_patch")
1313
class TestMCPServerFiltering:
14-
"""RHOAIENG-51584: Tests for MCP server filterQuery functionality."""
14+
"""Tests for MCP server filterQuery functionality."""
1515

1616
@pytest.mark.parametrize(
1717
"filter_query, expected_count, expected_name, field_check",
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
from typing import Self
2+
3+
import pytest
4+
from simple_logger.logger import get_logger
5+
6+
from tests.model_registry.mcp_servers.constants import CALCULATOR_SERVER_NAME
7+
from tests.model_registry.utils import execute_get_command
8+
9+
LOGGER = get_logger(name=__name__)
10+
11+
12+
@pytest.mark.usefixtures("mcp_servers_configmap_patch")
13+
class TestMCPServerKeywordSearch:
14+
"""Tests for MCP server keyword search via q parameter combined with other features."""
15+
16+
@pytest.mark.parametrize(
17+
"params, expected_names",
18+
[
19+
pytest.param(
20+
{"q": "Community", "filterQuery": "license='MIT'"},
21+
{"weather-api", CALCULATOR_SERVER_NAME},
22+
id="with_filter_query",
23+
),
24+
pytest.param(
25+
{"q": "Math", "namedQuery": "production_ready"},
26+
{CALCULATOR_SERVER_NAME},
27+
id="with_named_query",
28+
),
29+
],
30+
)
31+
def test_keyword_search_combined(
32+
self: Self,
33+
mcp_catalog_rest_urls: list[str],
34+
model_registry_rest_headers: dict[str, str],
35+
params: dict[str, str],
36+
expected_names: set[str],
37+
):
38+
"""TC-API-012: Test q parameter combined with filterQuery or namedQuery (AND logic)."""
39+
response = execute_get_command(
40+
url=f"{mcp_catalog_rest_urls[0]}mcp_servers",
41+
headers=model_registry_rest_headers,
42+
params=params,
43+
)
44+
items = response.get("items", [])
45+
actual_names = {server["name"] for server in items}
46+
assert actual_names == expected_names

tests/model_registry/mcp_servers/search/test_ordering.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
@pytest.mark.usefixtures("mcp_servers_configmap_patch")
1212
class TestMCPServerOrdering:
13-
"""RHOAIENG-51584: Tests for MCP server ordering functionality."""
13+
"""Tests for MCP server ordering functionality."""
1414

1515
@pytest.mark.parametrize(
1616
"sort_order",

tests/model_registry/mcp_servers/test_data_integrity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
@pytest.mark.usefixtures("mcp_servers_configmap_patch")
1717
class TestMCPServerLoading:
18-
"""RHOAIENG-51582: Tests for loading MCP servers from YAML into the catalog (TC-LOAD-001)."""
18+
"""Tests for loading MCP servers from YAML into the catalog (TC-LOAD-001)."""
1919

2020
def test_mcp_servers_loaded(
2121
self: Self,

tests/model_registry/model_catalog/catalog_config/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def recreated_model_catalog_configmap(
3535
ConfigMap: The recreated ConfigMap instance
3636
"""
3737
namespace_name = py_config["model_registry_namespace"]
38-
# TODO: RHOAIENG-46741 would require changing this to look for configmaps based on label
38+
# TODO: would require changing this to look for configmaps based on label
3939
# Get the existing ConfigMap
4040
configmap = ConfigMap(
4141
name=DEFAULT_CUSTOM_MODEL_CATALOG, client=admin_client, namespace=namespace_name, ensure_exists=True

0 commit comments

Comments
 (0)