Skip to content

Commit f1947d7

Browse files
committed
Fix tests
Signed-off-by: Graham King <[email protected]>
1 parent 1c647ae commit f1947d7

File tree

2 files changed

+22
-16
lines changed

2 files changed

+22
-16
lines changed

lib/llm/src/entrypoint/input/endpoint.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ mod integration_tests {
156156
.await
157157
.map_err(|e| anyhow::anyhow!("Failed to create distributed runtime: {}", e))?;
158158

159-
let engine_config = EngineConfig::StaticCore {
160-
engine: crate::engines::make_engine_core(),
159+
let engine_config = EngineConfig::StaticFull {
160+
engine: crate::engines::make_echo_engine(),
161161
model: Box::new(
162162
crate::local_model::LocalModelBuilder::default()
163163
.model_name(Some("test-model".to_string()))

lib/runtime/src/system_status_server.rs

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -444,21 +444,27 @@ mod integration_tests {
444444

445445
// Prepare test cases
446446
let mut test_cases = vec![];
447-
if custom_health_path.is_none() {
448-
// When using default paths, test the default paths
449-
test_cases.push(("/health", expected_status, expected_body));
450-
} else {
451-
// When using custom paths, default paths should not exist
452-
test_cases.push(("/health", 404, "Route not found"));
453-
test_cases.push((custom_health_path.unwrap(), expected_status, expected_body));
447+
match custom_health_path {
448+
None => {
449+
// When using default paths, test the default paths
450+
test_cases.push(("/health", expected_status, expected_body));
451+
}
452+
Some(chp) => {
453+
// When using custom paths, default paths should not exist
454+
test_cases.push(("/health", 404, "Route not found"));
455+
test_cases.push((chp, expected_status, expected_body));
456+
}
454457
}
455-
if custom_live_path.is_none() {
456-
// When using default paths, test the default paths
457-
test_cases.push(("/live", expected_status, expected_body));
458-
} else {
459-
// When using custom paths, default paths should not exist
460-
test_cases.push(("/live", 404, "Route not found"));
461-
test_cases.push((custom_live_path.unwrap(), expected_status, expected_body));
458+
match custom_live_path {
459+
None => {
460+
// When using default paths, test the default paths
461+
test_cases.push(("/live", expected_status, expected_body));
462+
}
463+
Some(clp) => {
464+
// When using custom paths, default paths should not exist
465+
test_cases.push(("/live", 404, "Route not found"));
466+
test_cases.push((clp, expected_status, expected_body));
467+
}
462468
}
463469
test_cases.push(("/someRandomPathNotFoundHere", 404, "Route not found"));
464470
assert_eq!(test_cases.len(), expected_num_tests);

0 commit comments

Comments
 (0)