mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 12:27:13 +02:00
Use more complete snapshot tests for the index scheduler
This commit is contained in:
parent
4c55c30027
commit
13a72f8757
13 changed files with 273 additions and 194 deletions
|
@ -58,6 +58,16 @@ impl FileStore {
|
|||
|
||||
Ok((uuid, update_file))
|
||||
}
|
||||
/// Creates a new temporary update file with the given Uuid.
|
||||
/// A call to `persist` is needed to persist the file in the database.
|
||||
pub fn new_update_woth_uuid(&self, uuid: u128) -> Result<(Uuid, File)> {
|
||||
let file = NamedTempFile::new_in(&self.path)?;
|
||||
let uuid = Uuid::from_u128(uuid);
|
||||
let path = self.path.join(uuid.to_string());
|
||||
let update_file = File { file, path };
|
||||
|
||||
Ok((uuid, update_file))
|
||||
}
|
||||
|
||||
/// Returns the file corresponding to the requested uuid.
|
||||
pub fn get_update(&self, uuid: Uuid) -> Result<StdFile> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue