Skip to content

Commit 066ea91

Browse files
committed
skip tests conditionally + linting
Signed-off-by: threcc <trecchiu@redhat.com>
1 parent 7fe1998 commit 066ea91

File tree

7 files changed

+18
-9
lines changed

7 files changed

+18
-9
lines changed

tests/model_serving/model_server/llmd/test_llmd_auth.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ def test_llmisvc_authorized(self, llmisvc_auth_pair):
3333

3434
for entry in [entry_a, entry_b]:
3535
status, body = send_chat_completions(
36-
llmisvc=entry.service, prompt=prompt, token=entry.token, insecure=False
36+
llmisvc=entry.service,
37+
prompt=prompt,
38+
token=entry.token,
39+
insecure=False,
3740
)
3841
assert status == 200, f"Authorized request failed with {status}: {body}"
3942
completion = parse_completion_text(response_body=body)

tests/model_serving/model_server/llmd/test_llmd_connection_cpu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
],
2222
indirect=True,
2323
)
24-
@pytest.mark.usefixtures("valid_aws_config")
24+
@pytest.mark.usefixtures("valid_aws_config", "skip_if_disconnected")
2525
class TestLlmdConnectionCpu:
2626
"""Deploy TinyLlama on CPU via S3 and HuggingFace and verify chat completions."""
2727

tests/model_serving/model_server/llmd/test_llmd_connection_gpu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
],
2222
indirect=True,
2323
)
24-
@pytest.mark.usefixtures("valid_aws_config", "skip_if_no_gpu_available")
24+
@pytest.mark.usefixtures("valid_aws_config", "skip_if_no_gpu_available", "skip_if_disconnected")
2525
class TestLlmdConnectionGpu:
2626
"""Deploy Qwen on GPU via S3 and HuggingFace and verify chat completions."""
2727

tests/model_serving/model_server/llmd/test_llmd_no_scheduler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def router_config(cls):
2626
[({"name": NAMESPACE}, S3GpuNoSchedulerConfig)],
2727
indirect=True,
2828
)
29-
@pytest.mark.usefixtures("valid_aws_config", "skip_if_no_gpu_available")
29+
@pytest.mark.usefixtures("valid_aws_config", "skip_if_no_gpu_available", "skip_if_disconnected")
3030
class TestLlmdNoScheduler:
3131
"""Deploy Qwen on GPU with the scheduler disabled and verify chat completions."""
3232

tests/model_serving/model_server/llmd/test_llmd_prefill_decode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
[({"name": NAMESPACE}, PrefillDecodeConfig)],
1919
indirect=True,
2020
)
21-
@pytest.mark.usefixtures("valid_aws_config", "skip_if_no_gpu_available")
21+
@pytest.mark.usefixtures("valid_aws_config", "skip_if_no_gpu_available", "skip_if_disconnected")
2222
class TestLlmdPrefillDecode:
2323
"""Deploy Qwen on GPU with prefill-decode disaggregation and verify chat completions."""
2424

tests/model_serving/model_server/llmd/test_llmd_singlenode_estimated_prefix_cache.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
[({"name": NAMESPACE}, EstimatedPrefixCacheConfig)],
3131
indirect=True,
3232
)
33-
@pytest.mark.usefixtures("valid_aws_config", "skip_if_less_than_2_gpus")
33+
@pytest.mark.usefixtures("valid_aws_config", "skip_if_less_than_2_gpus", "skip_if_disconnected")
3434
class TestSingleNodeEstimatedPrefixCache:
3535
"""Deploy Qwen on GPU with 2 replicas and estimated prefix cache routing,
3636
then verify cache hits via Prometheus metrics.
@@ -58,7 +58,10 @@ def test_singlenode_estimated_prefix_cache(
5858
assert len(workload_pods) == 2, f"Expected 2 workload pods, found {len(workload_pods)}"
5959

6060
successful = send_prefix_cache_requests(
61-
llmisvc=llmisvc, prompt=PREFIX_CACHE_PROMPT, token=llmisvc_token, count=NUM_REQUESTS
61+
llmisvc=llmisvc,
62+
prompt=PREFIX_CACHE_PROMPT,
63+
token=llmisvc_token,
64+
count=NUM_REQUESTS,
6265
)
6366
assert successful == NUM_REQUESTS, f"Expected all {NUM_REQUESTS} requests to succeed, got {successful}"
6467

tests/model_serving/model_server/llmd/test_llmd_singlenode_precise_prefix_cache.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
[({"name": NAMESPACE}, PrecisePrefixCacheConfig)],
3232
indirect=True,
3333
)
34-
@pytest.mark.usefixtures("valid_aws_config", "skip_if_less_than_2_gpus")
34+
@pytest.mark.usefixtures("valid_aws_config", "skip_if_less_than_2_gpus", "skip_if_disconnected")
3535
class TestSingleNodePrecisePrefixCache:
3636
"""Deploy Qwen on GPU with 2 replicas and precise prefix cache routing,
3737
then verify cache hits via Prometheus metrics.
@@ -60,7 +60,10 @@ def test_singlenode_precise_prefix_cache(
6060
assert len(workload_pods) == 2, f"Expected 2 workload pods, found {len(workload_pods)}"
6161

6262
successful = send_prefix_cache_requests(
63-
llmisvc=llmisvc, prompt=PREFIX_CACHE_PROMPT, token=llmisvc_token, count=NUM_REQUESTS
63+
llmisvc=llmisvc,
64+
prompt=PREFIX_CACHE_PROMPT,
65+
token=llmisvc_token,
66+
count=NUM_REQUESTS,
6467
)
6568
assert successful == NUM_REQUESTS, f"Expected all {NUM_REQUESTS} requests to succeed, got {successful}"
6669

0 commit comments

Comments
 (0)