Skip to content

Commit e2e533a

Browse files
committed
fix: update tests
1 parent 973dbfa commit e2e533a

6 files changed

Lines changed: 14 additions & 7 deletions

File tree

conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ def pytest_runtest_setup(item: Item) -> None:
223223
"""
224224
Performs the following actions:
225225
1. Updates global config (`updated_global_config`)
226-
2. Adds skip fixture for kserve if serverless or authorino operators are not installed.
227-
3. Adds skip fixture for serverless if authorino/serverless/service mesh are not deployed.
226+
2. Adds `fail_if_missing_dependant_operators` fixture for Serverless and model registry tests.
227+
3. Adds fixtures to enable KServe/model mesh in DSC for model server tests.
228228
"""
229229

230230
BASIC_LOGGER.info(f"\n{separator(symbol_='-', val=item.name)}")

docs/GETTING_STARTED.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ By default, cluster sanity checks are run to make cluster ready for tests.
6767
To skip cluster sanity checks, pass `--cluster-sanity-skip-check` to skip all tests.
6868
To skip RHOAI/ODH-related tests (for example when running in upstream), pass `--cluster-sanity-skip-rhoai-check`.
6969

70+
### Check dependent operators
71+
By default, `Serveless` (serverless-operator), `Authorino` (authorino-operator) and `Service Mesh` (servicemeshoperator) operators are checked to be installed when
72+
running model registry or model server Serverless tests.
73+
To check only specific operator, pass `--tc=dependent_operators:<operator_name>` to pytest.
74+
For example, to check only `Serveless` and `Service Mesh` operators, pass `--tc=dependent_operators:serverless-operator,servicemeshoperator`.
75+
76+
7077
### jira integration
7178
To skip running tests which have open bugs, [pytest_jira](https://github.com/rhevm-qe-automation/pytest_jira) plugin is used.
7279
To run tests with jira integration, you need to set `PYTEST_JIRA_URL` and `PYTEST_JIRA_TOKEN` environment variables.

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ def cluster_sanity_scope_session(
485485
def fail_if_missing_dependant_operators(admin_client: DynamicClient) -> None:
486486
missing_operators: list[str] = []
487487

488-
for operator_name in py_config["dependent_operators"]:
488+
for operator_name in py_config.get("dependent_operators", []).split(","):
489489
LOGGER.info(f"Verifying if {operator_name} is installed")
490490
for csv in ClusterServiceVersion.get(
491491
dyn_client=admin_client,

tests/global_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
applications_namespace: str = "redhat-ods-applications" # overwritten in conftest.py if distribution is upstream
55
dsc_name: str = "default-dsc"
66
dsci_name: str = "default-dsci"
7-
dependent_operators: list[str] = ["servicemeshoperator", "authorino-operator", "serverless-operator"]
7+
dependent_operators: str = "servicemeshoperator,authorino-operator,serverless-operator"
88

99
for _dir in dir():
1010
val = locals()[_dir]

tests/model_serving/model_server/upgrade/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ def caikit_raw_inference_service_scope_session(
290290
deployment_mode=KServeDeploymentType.RAW_DEPLOYMENT,
291291
storage_key=models_endpoint_s3_secret_scope_session.name,
292292
storage_path=ModelStoragePath.EMBEDDING_MODEL,
293-
external_route=True,
293+
external_route=False,
294294
teardown=teardown_resources,
295295
**isvc_kwargs,
296296
) as isvc:

tests/model_serving/model_server/upgrade/test_upgrade.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def test_raw_caikit_bge_pre_upgrade_inference(self, caikit_raw_inference_service
3333
inference_service=caikit_raw_inference_service_scope_session,
3434
inference_config=CAIKIT_STANDALONE_INFERENCE_CONFIG,
3535
inference_type="embedding",
36-
protocol=Protocols.HTTPS,
36+
protocol=Protocols.HTTP,
3737
model_name=ModelName.CAIKIT_BGE_LARGE_EN,
3838
use_default_query=True,
3939
)
@@ -105,7 +105,7 @@ def test_raw_caikit_bge_post_upgrade_inference(self, caikit_raw_inference_servic
105105
inference_service=caikit_raw_inference_service_scope_session,
106106
inference_config=CAIKIT_STANDALONE_INFERENCE_CONFIG,
107107
inference_type="embedding",
108-
protocol=Protocols.HTTPS,
108+
protocol=Protocols.HTTP,
109109
model_name=ModelName.CAIKIT_BGE_LARGE_EN,
110110
use_default_query=True,
111111
)

0 commit comments

Comments
 (0)