@@ -273,9 +273,10 @@ mod tests {
273
273
let test_dir =
274
274
get_test_directory ( "should_create_snapshots_in_its_ongoing_snapshot_directory" ) ;
275
275
let pending_snapshot_directory = test_dir. join ( "pending_snapshot" ) ;
276
- let db_directory = test_dir. join ( create_dir ( & test_dir , "db" ) ) ;
276
+ let db_directory = test_dir. join ( "db" ) ;
277
277
278
- create_file ( & db_directory, "file_to_archive.txt" ) ;
278
+ fs:: create_dir ( & db_directory) . unwrap ( ) ;
279
+ File :: create ( & db_directory. join ( "file_to_archive.txt" ) ) . unwrap ( ) ;
279
280
280
281
let snapshotter = CompressedArchiveSnapshotter :: new (
281
282
db_directory,
@@ -313,7 +314,7 @@ mod tests {
313
314
. snapshot_immutable_trio ( 2 , "immutable-2" )
314
315
. unwrap ( ) ;
315
316
316
- let unpack_dir = unpack_gz_decoder ( test_dir, snapshot ) ;
317
+ let unpack_dir = snapshot . unpack_gzip ( & test_dir) ;
317
318
let unpacked_files = list_files ( & unpack_dir) ;
318
319
let unpacked_immutable_files = list_files ( & unpack_dir. join ( IMMUTABLE_DIR ) ) ;
319
320
@@ -354,7 +355,7 @@ mod tests {
354
355
355
356
let snapshot = snapshotter. snapshot_ancillary ( 2 , "ancillary" ) . unwrap ( ) ;
356
357
357
- let unpack_dir = unpack_gz_decoder ( test_dir, snapshot ) ;
358
+ let unpack_dir = snapshot . unpack_gzip ( & test_dir) ;
358
359
359
360
let expected_immutable_path = unpack_dir. join ( IMMUTABLE_DIR ) ;
360
361
assert ! ( expected_immutable_path. join( "00003.chunk" ) . exists( ) ) ;
0 commit comments