mirror of
https://github.com/perstarkse/minne.git
synced 2026-05-28 02:19:34 +02:00
chore: additional clippy fixes after rebasing
This commit is contained in:
@@ -367,7 +367,7 @@ pub mod testing {
|
||||
storage: StorageKind::S3,
|
||||
s3_bucket: Some(configured_test_s3_bucket()),
|
||||
s3_endpoint: Some(configured_test_s3_endpoint()),
|
||||
s3_region: Some("us-east-1".into()),
|
||||
s3_region: "us-east-1".into(),
|
||||
pdf_ingest_mode: PdfIngestMode::LlmFirst,
|
||||
..Default::default()
|
||||
}
|
||||
|
||||
@@ -705,7 +705,7 @@ mod tests {
|
||||
let database = &Uuid::new_v4().to_string();
|
||||
let db = SurrealDbClient::memory(namespace, database)
|
||||
.await
|
||||
.with_context(|| "Failed to start in-memory surrealdb".to_string())?;
|
||||
.expect("Failed to start in-memory surrealdb");
|
||||
|
||||
// Create a FileInfo instance directly
|
||||
let now = Utc::now();
|
||||
@@ -728,14 +728,13 @@ mod tests {
|
||||
let retrieved = db
|
||||
.get_item::<FileInfo>(&file_info.id)
|
||||
.await
|
||||
.with_context(|| "Failed to retrieve file info".to_string())?
|
||||
.with_context(|| "expected file".to_string())?;
|
||||
.expect("Failed to retrieve file info")
|
||||
.expect("expected file");
|
||||
assert_eq!(retrieved.id, file_info.id);
|
||||
assert_eq!(retrieved.sha256, file_info.sha256);
|
||||
assert_eq!(retrieved.file_name, file_info.file_name);
|
||||
assert_eq!(retrieved.path, file_info.path);
|
||||
assert_eq!(retrieved.mime_type, file_info.mime_type);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
||||
@@ -829,21 +829,19 @@ mod tests {
|
||||
let database = &Uuid::new_v4().to_string();
|
||||
let db = SurrealDbClient::memory(namespace, database)
|
||||
.await
|
||||
.with_context(|| "Failed to start in-memory surrealdb".to_string())?;
|
||||
.expect("Failed to start in-memory surrealdb");
|
||||
db.apply_migrations()
|
||||
.await
|
||||
.with_context(|| "Failed to apply migrations".to_string())?;
|
||||
.expect("Failed to apply migrations");
|
||||
|
||||
KnowledgeEntityEmbedding::redefine_hnsw_index(&db, 3)
|
||||
.await
|
||||
.with_context(|| "Failed to redefine index length".to_string())?;
|
||||
.expect("Failed to redefine index length");
|
||||
|
||||
let results = KnowledgeEntity::vector_search(5, vec![0.1, 0.2, 0.3], &db, "user")
|
||||
.await
|
||||
.with_context(|| "vector search".to_string())?;
|
||||
.expect("vector search");
|
||||
assert!(results.is_empty());
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
||||
@@ -1036,7 +1036,7 @@ mod tests {
|
||||
|
||||
#[tokio::test]
|
||||
async fn test_set_api_key_with_none_theme() {
|
||||
let db = setup_test_db().await;
|
||||
let db = setup_test_db().await.expect("Failed to setup test db");
|
||||
|
||||
let user = User::create_new(
|
||||
"legacy_theme@example.com".to_string(),
|
||||
|
||||
Reference in New Issue
Block a user