Fix typo and remove useless code in tests

This commit is contained in:
Loïc Lecrenier 2022-10-11 09:55:03 +02:00 committed by Clément Renault
parent ab4e649221
commit eabac9676b
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4
2 changed files with 2 additions and 6 deletions

View File

@ -61,7 +61,7 @@ impl FileStore {
/// 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)> {
pub fn new_update_with_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());

View File

@ -366,7 +366,7 @@ impl IndexScheduler {
}
#[cfg(test)]
pub fn create_update_file_with_uuid(&self, uuid: u128) -> Result<(Uuid, File)> {
Ok(self.file_store.new_update_woth_uuid(uuid)?)
Ok(self.file_store.new_update_with_uuid(uuid)?)
}
pub fn delete_update_file(&self, uuid: Uuid) -> Result<()> {
@ -726,8 +726,6 @@ mod tests {
// the "task deletion" task should be marked as "succeeded" and, in its details, the
// number of deleted tasks should be 0
assert_snapshot!(snapshot_index_scheduler(&index_scheduler));
handle.dont_block();
}
#[test]
@ -767,8 +765,6 @@ mod tests {
handle.wait_till(Breakpoint::AfterProcessing);
assert_snapshot!(snapshot_index_scheduler(&index_scheduler));
handle.dont_block();
}
#[test]