upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/tests/purgatory_persistence.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2026-02-26 15:42:09 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2026-02-26 15:42:09 +0000
commit9d86cf15f0275ffeee4519bd054e3b61dc8992ac (patch)
tree65b5d5ffb2a11b5ecd05d01e63fb5a4a0f8b6e06 /tests/purgatory_persistence.rs
parenta2ecfc5a63311570f0f90c7ee40117e289639cb8 (diff)
chore: apply cargo fmt and fix clippy warnings
Fix pre-existing clippy lints: - &PathBuf -> &Path in audit_cleanup.rs - too_many_arguments on process_newly_available_git_data, process_purgatory_announcements, and HttpService::new - clone_on_copy for PublicKey (Copy type) in purgatory cleanup loop
Diffstat (limited to 'tests/purgatory_persistence.rs')
-rw-r--r--tests/purgatory_persistence.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/purgatory_persistence.rs b/tests/purgatory_persistence.rs
index 655b0d9..0c1de28 100644
--- a/tests/purgatory_persistence.rs
+++ b/tests/purgatory_persistence.rs
@@ -169,7 +169,10 @@ async fn test_full_purgatory_save_restore_cycle() {
169 169
170 // Verify all data was restored 170 // Verify all data was restored
171 let (announcement_count2, state_count2, pr_count2) = purgatory2.count(); 171 let (announcement_count2, state_count2, pr_count2) = purgatory2.count();
172 assert_eq!(announcement_count2, 1, "Should have 1 announcement after restore"); 172 assert_eq!(
173 announcement_count2, 1,
174 "Should have 1 announcement after restore"
175 );
173 assert_eq!(state_count2, 2, "Should have 2 state events after restore"); 176 assert_eq!(state_count2, 2, "Should have 2 state events after restore");
174 assert_eq!( 177 assert_eq!(
175 pr_count2, 3, 178 pr_count2, 3,
@@ -853,7 +856,10 @@ async fn test_announcement_save_restore_cycle() {
853 let purgatory2 = Purgatory::new(&git_data_path); 856 let purgatory2 = Purgatory::new(&git_data_path);
854 purgatory2.restore_from_disk(&state_path).unwrap(); 857 purgatory2.restore_from_disk(&state_path).unwrap();
855 858
856 assert!(!state_path.exists(), "State file should be deleted after restore"); 859 assert!(
860 !state_path.exists(),
861 "State file should be deleted after restore"
862 );
857 863
858 let (ann_count2, _, _) = purgatory2.count(); 864 let (ann_count2, _, _) = purgatory2.count();
859 assert_eq!(ann_count2, 1, "Announcement should be restored"); 865 assert_eq!(ann_count2, 1, "Announcement should be restored");