MCPcopy Create free account
hub / github.com/Moosync/Moosync / cleanup

Function cleanup

src-tauri/database/src/test.rs:35–42  ·  view source on GitHub ↗

Helper function to clean up DB files

(db_path: &PathBuf)

Source from the content-addressed store, hash-verified

33
34// Helper function to clean up DB files
35fn cleanup(db_path: &PathBuf) {
36 let base_path = db_path.to_string_lossy().to_string();
37
38 // Ignore errors as files might not exist
39 let _ = fs::remove_file(db_path);
40 let _ = fs::remove_file(format!("{}-shm", base_path));
41 let _ = fs::remove_file(format!("{}-wal", base_path));
42}
43
44// Test utility function to create a test song
45fn create_test_song(title: &str, path: &str) -> Song {

Callers 9

test_insert_songFunction · 0.85
test_update_songFunction · 0.85
test_remove_songsFunction · 0.85
test_playlist_operationsFunction · 0.85
test_album_operationsFunction · 0.85
test_artist_operationsFunction · 0.85
test_searchFunction · 0.85
test_analyticsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected