Skip to content

Commit a6e34a9

Browse files
committed
Remove references of istio and use oauth for all test scenarios
1 parent a4afb16 commit a6e34a9

File tree

12 files changed

+3
-30
lines changed

12 files changed

+3
-30
lines changed

tests/model_registry/conftest.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ def model_registry_db_service(
6262
admin_client: DynamicClient,
6363
teardown_resources: bool,
6464
model_registry_namespace: str,
65-
is_model_registry_oauth: bool,
6665
) -> Generator[list[Service], Any, Any]:
6766
num_resources = getattr(request, "param", {}).get("num_resources", 1)
6867
if pytestconfig.option.post_upgrade:
@@ -89,7 +88,6 @@ def model_registry_db_pvc(
8988
admin_client: DynamicClient,
9089
teardown_resources: bool,
9190
model_registry_namespace: str,
92-
is_model_registry_oauth: bool,
9391
) -> Generator[list[PersistentVolumeClaim], Any, Any]:
9492
num_resources = getattr(request, "param", {}).get("num_resources", 1)
9593
if pytestconfig.option.post_upgrade:
@@ -116,7 +114,6 @@ def model_registry_db_secret(
116114
admin_client: DynamicClient,
117115
teardown_resources: bool,
118116
model_registry_namespace: str,
119-
is_model_registry_oauth: bool,
120117
) -> Generator[list[Secret], Any, Any]:
121118
num_resources = getattr(request, "param", {}).get("num_resources", 1)
122119
if pytestconfig.option.post_upgrade:
@@ -143,7 +140,6 @@ def model_registry_db_deployment(
143140
admin_client: DynamicClient,
144141
teardown_resources: bool,
145142
model_registry_namespace: str,
146-
is_model_registry_oauth: bool,
147143
) -> Generator[list[Deployment], Any, Any]:
148144
num_resources = getattr(request, "param", {}).get("num_resources", 1)
149145
if pytestconfig.option.post_upgrade:
@@ -182,7 +178,6 @@ def model_registry_instance_mysql(
182178
admin_client: DynamicClient,
183179
teardown_resources: bool,
184180
model_registry_namespace: str,
185-
is_model_registry_oauth: bool,
186181
) -> Generator[list[Any], Any, Any]:
187182
"""Creates a model registry instance with oauth proxy configuration."""
188183
param = getattr(request, "param", {})
@@ -257,7 +252,7 @@ def updated_dsc_component_state_scope_class(
257252
dsc_resource.wait_for_condition(
258253
condition=DscComponents.COMPONENT_MAPPING[component_name], status="True"
259254
)
260-
namespace = Namespace(name=py_config["model_registry_namespace"], ensure_exists=True)
255+
namespace = Namespace(name=py_config["model_registry_namespace"], wait_for_resource=True)
261256
namespace.wait_for_status(status=Namespace.Status.ACTIVE)
262257
wait_for_pods_running(
263258
admin_client=admin_client,
@@ -455,11 +450,6 @@ def delete_mr_deployment() -> None:
455450
mr_deployment.delete(wait=True)
456451

457452

458-
@pytest.fixture(scope="class")
459-
def is_model_registry_oauth(request: FixtureRequest) -> bool:
460-
return getattr(request, "param", {}).get("use_oauth_proxy", True)
461-
462-
463453
@pytest.fixture(scope="session")
464454
def api_server_url(admin_client: DynamicClient) -> str:
465455
infrastructure = Infrastructure(client=admin_client, name="cluster", ensure_exists=True)

tests/model_registry/constants.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ class ModelRegistryEndpoints:
2828
MR_INSTANCE_BASE_NAME: str = "model-registry"
2929
MR_INSTANCE_NAME: str = f"{MR_INSTANCE_BASE_NAME}0"
3030
SECURE_MR_NAME: str = "secure-db-mr"
31-
ISTIO_CONFIG_DICT: dict[str, Any] = {
32-
"gateway": {"grpc": {"tls": {}}, "rest": {"tls": {}}},
33-
}
3431
OAUTH_PROXY_CONFIG_DICT: dict[str, Any] = {
3532
"port": 8443,
3633
"routePort": 443,

tests/model_registry/image_validation/test_verify_rhoai_images.py

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

1414
@pytest.mark.usefixtures(
1515
"updated_dsc_component_state_scope_class",
16-
"is_model_registry_oauth",
1716
"mysql_metadata_resources",
1817
"model_registry_instance_mysql",
1918
)

tests/model_registry/python_client/test_model_registry_creation.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
)
3232
@pytest.mark.usefixtures(
3333
"updated_dsc_component_state_scope_class",
34-
"is_model_registry_oauth",
3534
"model_registry_namespace",
3635
"model_registry_db_secret",
3736
"model_registry_db_pvc",

tests/model_registry/rbac/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ def updated_dsc_component_state_parametrized(
451451
dsc_resource.wait_for_condition(
452452
condition=DscComponents.COMPONENT_MAPPING[DscComponents.MODELREGISTRY], status="True"
453453
)
454-
namespace = Namespace(name=namespace_name, ensure_exists=True)
454+
namespace = Namespace(name=namespace_name, wait_for_resource=True)
455455
namespace.wait_for_status(status=Namespace.Status.ACTIVE)
456456
wait_for_pods_running(
457457
admin_client=admin_client,

tests/model_registry/rbac/test_mr_rbac.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040

4141
@pytest.mark.usefixtures(
4242
"updated_dsc_component_state_scope_class",
43-
"is_model_registry_oauth",
4443
"mysql_metadata_resources",
4544
"model_registry_instance_mysql",
4645
)

tests/model_registry/rbac/test_mr_rbac_sa.py

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

1212
@pytest.mark.usefixtures(
1313
"updated_dsc_component_state_scope_class",
14-
"is_model_registry_oauth",
1514
"mysql_metadata_resources",
1615
"model_registry_instance_mysql",
1716
)

tests/model_registry/rest_api/conftest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
@pytest.fixture(scope="class")
4747
def registered_model_rest_api(
4848
request: pytest.FixtureRequest,
49-
is_model_registry_oauth: bool,
5049
model_registry_rest_url: list[str],
5150
model_registry_rest_headers: dict[str, str],
5251
) -> dict[str, Any]:

tests/model_registry/rest_api/mariadb/conftest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ def model_registry_with_mariadb(
6767
admin_client: DynamicClient,
6868
model_registry_namespace: str,
6969
mariadb_mysql_config: dict[str, Any],
70-
is_model_registry_oauth: bool,
7170
) -> Generator[ModelRegistry, Any, Any]:
7271
with ModelRegistry(
7372
name=MR_INSTANCE_NAME,

tests/model_registry/rest_api/mariadb/test_mr_mariadb.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
)
3434
@pytest.mark.usefixtures(
3535
"updated_dsc_component_state_scope_class",
36-
"is_model_registry_oauth",
3736
"deployed_mariadb",
3837
"model_registry_with_mariadb",
3938
"registered_model_rest_api",

0 commit comments

Comments
 (0)