Skip to content

Commit 26289b6

Browse files
committed
change: add sanity to tests that are not failing or already marked
1 parent f230742 commit 26289b6

File tree

11 files changed

+25
-1
lines changed

11 files changed

+25
-1
lines changed

tests/model_registry/async_job/test_async_upload_e2e.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
class TestAsyncUploadE2E:
6262
"""RHOAIENG-32501: Test for async upload job with real MinIO, OCI registry, Connection Secrets and Model Registry"""
6363

64-
# FAILS until https://github.com/kubeflow/model-registry/pull/1499 is merged
64+
# FAILS until https://github.com/kubeflow/model-registry/pull/1499 is merged downstream
6565
@pytest.mark.dependency(name="job_creation_and_pod_spawning")
6666
def test_job_creation_and_pod_spawning(
6767
self: Self,

tests/model_registry/model_catalog/test_custom_model_catalog.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"updated_catalog_config_map",
3636
)
3737
class TestModelCatalogRhec:
38+
@pytest.mark.sanity
3839
def test_model_custom_catalog_sources(
3940
self: Self,
4041
updated_catalog_config_map: tuple[ConfigMap, str, str],
@@ -52,6 +53,7 @@ def test_model_custom_catalog_sources(
5253
assert len(result) == 1
5354
assert result[0]["id"] == expected_catalog_values["id"]
5455

56+
@pytest.mark.sanity
5557
def test_model_custom_catalog_models(
5658
self: Self,
5759
updated_catalog_config_map: tuple[ConfigMap, str, str],
@@ -68,6 +70,7 @@ def test_model_custom_catalog_models(
6870
)["items"]
6971
assert result, f"Expected custom models to be present. Actual: {result}"
7072

73+
@pytest.mark.sanity
7174
def test_model_custom_catalog_get_model_by_name(
7275
self: Self,
7376
updated_catalog_config_map: tuple[ConfigMap, str, str],
@@ -85,6 +88,7 @@ def test_model_custom_catalog_get_model_by_name(
8588
)
8689
assert result["name"] == model_name
8790

91+
@pytest.mark.sanity
8892
def test_model_custom_catalog_get_artifact(
8993
self: Self,
9094
updated_catalog_config_map: tuple[ConfigMap, str, str],

tests/model_registry/model_catalog/test_default_model_catalog.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"model_registry_metadata_db_resources",
1919
)
2020
class TestModelCatalog:
21+
@pytest.mark.sanity
2122
def test_config_map_not_created(self: Self, catalog_config_map: ConfigMap):
2223
# Check that the default configmaps does not exist, when model registry is not created
2324
assert not catalog_config_map.exists
@@ -29,11 +30,13 @@ def test_config_map_exists(self: Self, model_registry_instance: ModelRegistry, c
2930
models = yaml.safe_load(catalog_config_map.instance.data["sources.yaml"])["catalogs"]
3031
assert not models, f"Expected no default models to be present. Actual: {models}"
3132

33+
@pytest.mark.sanity
3234
def test_operator_pod_enabled_model_catalog(
3335
self: Self, model_registry_instance: ModelRegistry, model_registry_operator_pod: Pod
3436
):
3537
assert validate_model_catalog_enabled(pod=model_registry_operator_pod)
3638

39+
@pytest.mark.sanity
3740
def test_model_catalog_no_custom_catalog(
3841
self,
3942
model_registry_instance: ModelRegistry,

tests/model_registry/negative_tests/test_db_migration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"updated_dsc_component_state_scope_session", "model_registry_metadata_db_resources", "model_registry_instance"
1717
)
1818
class TestDBMigration:
19+
@pytest.mark.sanity
1920
def test_db_migration_negative(
2021
self: Self,
2122
admin_client: DynamicClient,

tests/model_registry/negative_tests/test_model_registry_creation_negative.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
)
2929
@pytest.mark.custom_namespace
3030
class TestModelRegistryCreationNegative:
31+
@pytest.mark.sanity
3132
def test_registering_model_negative(
3233
self: Self,
3334
current_client_token: str,

tests/model_registry/python_client/test_model_registry_creation.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def test_registering_model(
6565
if errors:
6666
pytest.fail("errors found in model registry response validation:\n{}".format("\n".join(errors)))
6767

68+
@pytest.mark.sanity
6869
def test_model_registry_operator_env(
6970
self,
7071
model_registry_namespace: str,
@@ -78,6 +79,7 @@ def test_model_registry_operator_env(
7879
if not namespace_env:
7980
pytest.fail("Missing environment variable REGISTRIES_NAMESPACE")
8081

82+
@pytest.mark.sanity
8183
def test_model_registry_grpc_container_removal(self, model_registry_deployment_containers: list[dict[str, Any]]):
8284
"""
8385
RHOAIENG-26239: Test to ensure removal of grpc container from model registry deployment
@@ -88,6 +90,7 @@ def test_model_registry_grpc_container_removal(self, model_registry_deployment_c
8890
"""
8991
validate_no_grpc_container(deployment_containers=model_registry_deployment_containers)
9092

93+
@pytest.mark.sanity
9194
def test_model_registry_pod_log_mlmd_removal(
9295
self, model_registry_deployment_containers: list[dict[str, Any]], model_registry_pod: Pod
9396
):
@@ -116,6 +119,7 @@ def test_model_registry_pod_log_mlmd_removal(
116119
),
117120
],
118121
)
122+
@pytest.mark.sanity
119123
def test_model_registry_endpoint_response(
120124
self, model_registry_rest_url: list[str], model_registry_rest_headers: dict[str, str], endpoint: str
121125
):

tests/model_registry/rbac/test_mr_rbac.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ class TestUserMultiProjectPermission:
145145
MR_MULTIPROJECT_TEST_SCENARIO_PARAMS,
146146
indirect=True,
147147
)
148+
@pytest.mark.sanity
148149
def test_user_permission_multi_project_parametrized(
149150
self: Self,
150151
test_idp_user: UserTestSession,

tests/model_registry/rest_api/test_model_registry_rest_api.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ def test_validate_model_registry_resource(
8686
resource_name=data_key,
8787
)
8888

89+
@pytest.mark.sanity
8990
def test_model_registry_validate_api_version(
9091
self: Self,
9192
model_registry_instance,
@@ -99,6 +100,7 @@ def test_model_registry_validate_api_version(
99100
expected_version = f"{ModelRegistry.ApiGroup.MODELREGISTRY_OPENDATAHUB_IO}/{ModelRegistry.ApiVersion.V1BETA1}"
100101
assert api_version == expected_version
101102

103+
@pytest.mark.sanity
102104
def test_model_registry_validate_oauthproxy_enabled(
103105
self: Self,
104106
model_registry_instance,
@@ -187,6 +189,7 @@ def test_create_update_model_artifact(
187189
],
188190
indirect=["updated_model_registry_resource"],
189191
)
192+
@pytest.mark.sanity
190193
def test_updated_model_version(
191194
self,
192195
updated_model_registry_resource: dict[str, Any],
@@ -232,6 +235,7 @@ def test_updated_model_version(
232235
],
233236
indirect=["updated_model_registry_resource"],
234237
)
238+
@pytest.mark.sanity
235239
def test_updated_registered_model(
236240
self,
237241
updated_model_registry_resource: dict[str, Any],

tests/model_registry/rest_api/test_model_registry_secure_db.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ class TestModelRegistryWithSecureDB:
4242
"patch_mysql_deployment_with_ssl_ca",
4343
"patch_invalid_ca",
4444
)
45+
@pytest.mark.sanity
4546
def test_register_model_with_invalid_ca(
4647
self: Self,
4748
admin_client: DynamicClient,

tests/model_registry/rest_api/test_multiple_mr.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def test_validate_multiple_model_registry(
4545
)
4646
LOGGER.info(f"{mr.name} found")
4747

48+
@pytest.mark.sanity
4849
def test_validate_one_model_catalog_configmap(
4950
self: Self, admin_client: DynamicClient, model_registry_namespace: str
5051
):
@@ -60,6 +61,7 @@ def test_validate_one_model_catalog_configmap(
6061
f"Expected {expected_number_config_maps} modelcatalog sources, found: {config_map_names}"
6162
)
6263

64+
# FAILS until https://github.com/opendatahub-io/model-registry-operator/pull/298/ is merged downstream
6365
def test_validate_one_model_catalog_pod(self: Self, admin_client: DynamicClient, model_registry_namespace: str):
6466
"""
6567
Validate that even when multiple MR exists on a cluster, only one model catalog pod is created
@@ -73,6 +75,7 @@ def test_validate_one_model_catalog_pod(self: Self, admin_client: DynamicClient,
7375
f"Expected {expected_number_pods} model catalog pods, found: {[pod.name for pod in catalog_pods]}"
7476
)
7577

78+
@pytest.mark.sanity
7679
def test_validate_register_models_multiple_registries(
7780
self: Self, model_registry_rest_url: list[str], model_registry_rest_headers: dict[str, str]
7881
):

0 commit comments

Comments
 (0)