Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test: replace expect_err with explicit match in empty-url test

Steven Enamakela1d7f10dfb35
diff --git a/src/openhuman/inference/embeddings/mod_tests.rs b/src/openhuman/inference/embeddings/mod_tests.rs
index 2a34b2697b..3dbdada08e 100644
--- a/src/openhuman/inference/embeddings/mod_tests.rs
+++ b/src/openhuman/inference/embeddings/mod_tests.rs
@@ -65,8 +65,10 @@ fn factory_custom_url() {
#[test]
fn factory_custom_empty_url() {
- let error = create_embedding_provider("custom:", "model", 768)
- .expect_err("an empty custom endpoint must be rejected before construction");
+ let error = match create_embedding_provider("custom:", "model", 768) {
+ Ok(_) => panic!("an empty custom endpoint must be rejected before construction"),
+ Err(error) => error,
+ };
assert!(error.to_string().contains("must not be empty"));
}