Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
)
@pytest.mark.usefixtures("mcp_invalid_yaml_configmap_patch")
class TestMCPServerInvalidYAML:
"""RHOAIENG-51582: Tests for graceful handling of invalid YAML sources (TC-LOAD-007, TC-LOAD-008)."""
"""
Tests for graceful handling of invalid YAML sources (TC-LOAD-007, TC-LOAD-008)."""

def test_valid_servers_loaded_despite_invalid_source(
self: Self,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

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

def test_all_servers_from_multiple_sources_loaded(
self: Self,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

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

@pytest.mark.parametrize(
"named_query, expected_custom_properties",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

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

@pytest.mark.parametrize(
"filter_query, expected_count, expected_name, field_check",
Expand Down
2 changes: 1 addition & 1 deletion tests/model_registry/mcp_servers/search/test_ordering.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

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

@pytest.mark.parametrize(
"sort_order",
Expand Down
2 changes: 1 addition & 1 deletion tests/model_registry/mcp_servers/test_data_integrity.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

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

def test_mcp_servers_loaded(
self: Self,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def recreated_model_catalog_configmap(
ConfigMap: The recreated ConfigMap instance
"""
namespace_name = py_config["model_registry_namespace"]
# TODO: RHOAIENG-46741 would require changing this to look for configmaps based on label
# TODO: would require changing this to look for configmaps based on label
# Get the existing ConfigMap
configmap = ConfigMap(
name=DEFAULT_CUSTOM_MODEL_CATALOG, client=admin_client, namespace=namespace_name, ensure_exists=True
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def test_catalog_source_merge(
model_registry_rest_headers: dict[str, str],
):
"""
RHOAIENG-41738: Test that a sparse override in custom ConfigMap successfully overrides
Test that a sparse override in custom ConfigMap successfully overrides
specific fields while preserving unspecified fields.
"""
catalog_id = sparse_override_catalog_source["catalog_id"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def test_model_default_catalog_number_of_models(
default_model_catalog_yaml_content: dict[Any, Any],
):
"""
RHOAIENG-33667: Validate number of models in default catalog
Validate number of models in default catalog
"""

count = len(default_model_catalog_yaml_content.get("models", []))
Expand All @@ -275,7 +275,7 @@ def test_model_default_catalog_correspondence_of_model_name(
catalog_openapi_schema: dict[Any, Any],
):
"""
RHOAIENG-35260: Validate the correspondence of model parameters in default catalog yaml and model catalog api
Validate the correspondence of model parameters in default catalog yaml and model catalog api
"""

all_model_fields, required_model_fields = extract_schema_fields(
Expand Down Expand Up @@ -326,7 +326,6 @@ def test_model_default_catalog_correspondence_of_model_name(
models_with_differences[model["name"]] = differences
LOGGER.warning(f"Found value differences for {model['name']}: {differences}")

# FAILS for null-valued properties in YAML model until https://issues.redhat.com/browse/RHOAIENG-35322 is fixed
assert not models_with_differences, (
f"Found differences in {len(models_with_differences)} model(s): {models_with_differences}"
)
Expand All @@ -340,7 +339,7 @@ def test_model_default_catalog_random_artifact(
catalog_openapi_schema: dict[Any, Any],
):
"""
RHOAIENG-35260: Validate the random artifact in default catalog yaml matches API response
Validate the random artifact in default catalog yaml matches API response
"""

all_artifact_fields, required_artifact_fields = extract_schema_fields(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@


class TestModelInclusionFiltering:
"""Test inclusion filtering functionality (RHOAIENG-41841)"""
"""Test inclusion filtering functionality"""

@pytest.mark.parametrize(
"redhat_ai_models_with_filter",
Expand Down Expand Up @@ -76,7 +76,7 @@ def test_include_models_by_pattern(


class TestModelExclusionFiltering:
"""Test exclusion filtering functionality (RHOAIENG-41841 part 2)"""
"""Test exclusion filtering functionality"""

@pytest.mark.parametrize(
"redhat_ai_models_with_filter",
Expand Down Expand Up @@ -119,7 +119,7 @@ def test_exclude_models_by_pattern(


class TestCombinedIncludeExcludeFiltering:
"""Test combined include+exclude filtering (RHOAIENG-41841 part 3)"""
"""Test combined include+exclude filtering"""

@pytest.mark.parametrize(
"redhat_ai_models_with_filter",
Expand Down Expand Up @@ -169,7 +169,7 @@ def test_combined_include_exclude_filtering(


class TestModelCleanupLifecycle:
"""Test automatic model cleanup during lifecycle changes (RHOAIENG-41846)"""
"""Test automatic model cleanup during lifecycle changes"""

@pytest.mark.tier2
def test_model_cleanup_on_exclusion_change(
Expand Down Expand Up @@ -274,7 +274,7 @@ def test_model_cleanup_on_exclusion_change(

@pytest.mark.usefixtures("disabled_redhat_ai_source")
class TestSourceLifecycleCleanup:
"""Test source disabling cleanup scenarios (RHOAIENG-41846)"""
"""Test source disabling cleanup scenarios"""

@pytest.mark.tier2
def test_source_disabling_removes_models(
Expand Down Expand Up @@ -316,7 +316,7 @@ def test_source_disabling_logging(


class TestLoggingValidation:
"""Test cleanup operation logging (RHOAIENG-41846)"""
"""Test cleanup operation logging"""

@pytest.mark.parametrize(
"redhat_ai_models_with_filter",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def test_search_model_catalog_huggingface(
source_filter: str,
):
"""
RHOAIENG-41869: Validate search model catalog by match
Validate search model catalog by match
"""
LOGGER.info(f"Testing ability to filter models by name: {hf_model_name}")
result = get_models_from_catalog_api(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@
indirect=["updated_catalog_config_map", "hf_source_filter"],
)
class TestModelTypeClassification:
"""RHOAIENG-49090: Test suite for model_type classification on Hugging Face models."""
"""
Test suite for model_type classification on Hugging Face models.
"""

@pytest.mark.parametrize("model_type_filter", ["generative", "predictive", "unknown"])
def test_model_type_filter_and_classification(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"model_registry_namespace",
)
class TestHuggingFaceSourceErrorValidation:
"""Test cases for RHOAIENG-47934 - Partial model fetching errors should not affect other models."""
"""Partial model fetching errors should not affect other models."""

def test_source_state_and_message(
self: Self,
Expand All @@ -58,7 +58,7 @@ def test_source_state_and_message(
model_registry_rest_headers: dict[str, str],
):
"""
RHOAIENG-47934: Verify source shows error state with correct error message.
Verify source shows error state with correct error message.

This test verifies that:
1. The source is in error state due to private model fetch failure
Expand Down Expand Up @@ -89,7 +89,7 @@ def test_accessible_models_catalog_api_source_id(
model_registry_rest_headers: dict[str, str],
):
"""
RHOAIENG-49162: Check that accessible models are visible through catalog API using source label.
Check that accessible models are visible through catalog API using source label.

This test verifies that accessible models are still returned by the catalog API
even when the source is in error state.
Expand All @@ -108,7 +108,7 @@ def test_accessible_models_catalog_api_no_source_id(
model_registry_rest_headers: dict[str, str],
):
"""
RHOAIENG-47934: Check that accessible models are visible through catalog API.
Check that accessible models are visible through catalog API.

This test verifies that accessible models are still returned by the catalog API
even when the source is in error state.
Expand All @@ -127,7 +127,7 @@ def test_inaccessible_models_not_found_via_api_calls(
model_registry_rest_headers: dict[str, str],
):
"""
RHOAIENG-47934: Ensure inaccessible models are not found via API calls.
Ensure inaccessible models are not found via API calls.

This test verifies that inaccessible models (private/gated) correctly return
"Not Found" errors when accessed via individual model API endpoints.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
class TestCatalogPreviewExistingSource:
"""
Test class for validating the catalog preview API for an existing source
RHOAIENG-41826
"""

@pytest.mark.parametrize("default_model_catalog_yaml_content", [VALIDATED_CATALOG_ID], indirect=True)
Expand Down Expand Up @@ -204,7 +203,6 @@ def test_catalog_preview_filter_status(
class TestCatalogPreviewErrorHandling:
"""
Test class for validating the catalog preview API error handling
RHOAIENG-41826
"""

@pytest.mark.parametrize(
Expand Down Expand Up @@ -290,7 +288,6 @@ def test_catalog_preview_invalid_config(
class TestCatalogPreviewUserProvidedData:
"""
Test class for validating the catalog preview API with user-provided catalog data
RHOAIENG-41826
"""

@pytest.mark.usefixtures(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def test_model_type_field_in_custom_properties(
model_registry_rest_headers: dict[str, str],
):
"""
RHOAIENG-41720: Test that all models have model_type with valid values: "generative", "predictive", "unknown".
Test that all models have model_type with valid values: "generative", "predictive", "unknown".
"""
valid_model_types = {"generative", "predictive", "unknown"}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
class TestFilterOptionsEndpoint:
"""
Test class for validating the models/filter_options endpoint
RHOAIENG-36696
"""

# Cannot use non-admin user for this test as it cannot list the pods in the namespace
Expand Down Expand Up @@ -58,8 +57,6 @@ def test_comprehensive_coverage_against_database(

This test executes the exact same SQL query the API uses and compares results
to catch any discrepancies between database content and API response.

Expected failure because of RHOAIENG-37069 & RHOAIENG-37226
"""
api_url = f"{model_catalog_rest_url[0]}models/filter_options"
LOGGER.info(f"Testing comprehensive database coverage for: {api_url}")
Expand Down Expand Up @@ -125,7 +122,6 @@ def test_named_queries_in_filter_options(
test_idp_user: UserTestSession,
):
"""
Test for: RHOAIENG-38836
Validate that namedQueries field is present in filter_options response.
Validates that default-performance-filters named query exists with expected properties.
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_sources_endpoint_returns_all_sources_regardless_of_enabled_field(
model_registry_rest_headers: dict[str, str],
):
"""
RHOAIENG-41633: Test that sources endpoint returns ALL sources regardless of enabled field value.
Test that sources endpoint returns ALL sources regardless of enabled field value.
"""
response = execute_get_command(url=f"{model_catalog_rest_url[0]}sources", headers=model_registry_rest_headers)
items = response.get("items", [])
Expand All @@ -53,7 +53,7 @@ def test_sources_endpoint_returns_all_sources_regardless_of_enabled_field(

@pytest.mark.usefixtures("mcp_servers_configmap_patch")
class TestAssetTypeFilter:
"""RHOAIENG-51583: Tests for /sources endpoint assetType query parameter filtering."""
"""Tests for /sources endpoint assetType query parameter filtering."""

@pytest.mark.parametrize(
"asset_type,expected_ids",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def test_admin_can_read_catalog_configmaps(
configmap_name: str,
):
"""
RHOAIENG-41850: Verify that admin users can read both catalog ConfigMaps.
Verify that admin users can read both catalog ConfigMaps.
Admins should have:
- get/watch on model-catalog-default-sources (read-only)
Expand Down Expand Up @@ -84,7 +84,7 @@ def test_non_admin_cannot_access_catalog_configmaps(
configmap_name: str,
):
"""
RHOAIENG-41850: Verify that non-admin users cannot access catalog ConfigMaps,
Verify that non-admin users cannot access catalog ConfigMaps,
receiving a 403 Forbidden error.
"""
if is_byoidc:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def test_validate_model_artifacts_by_artifact_type(
artifact_type: str,
):
"""
RHOAIENG-33659: Validates that the model artifacts returned by the artifactType filter
Validates that the model artifacts returned by the artifactType filter
match the complete set of artifacts for a random model.
"""
_, model_name, catalog_id = randomly_picked_model_from_catalog_api_by_source
Expand Down Expand Up @@ -310,7 +310,7 @@ def test_multiple_artifact_type_filtering(
randomly_picked_model_from_catalog_api_by_source: tuple[dict[Any, Any], str, str],
):
"""
RHOAIENG-33659: Validates that the API returns all artifacts of a random model
Validates that the API returns all artifacts of a random model
when filtering by multiple artifact types.
"""
_, model_name, catalog_id = randomly_picked_model_from_catalog_api_by_source
Expand Down
Loading
Loading