diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2025-07-16 10:10:41 +0100 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2025-07-16 10:39:35 +0100 |
| commit | 092b9606ff2b721d858a5c7b2b27a2f9942b4bc4 (patch) | |
| tree | 29022aee83ac0460098dfdbd4362ef75388c4ea7 /tests/git_remote_nostr/list.rs | |
| parent | 6e041a3626f04e591d5c22f71d3e4ab2b03bd7bb (diff) | |
chore: nix flake update
required running:
`cargo fix --allow-dirty --allow-staged`
`cargo clippy --fix --allow-dirty -- -D warnings`
to fix problems
and then manually fixing some too
Diffstat (limited to 'tests/git_remote_nostr/list.rs')
| -rw-r--r-- | tests/git_remote_nostr/list.rs | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/tests/git_remote_nostr/list.rs b/tests/git_remote_nostr/list.rs index 37cff30..c201054 100644 --- a/tests/git_remote_nostr/list.rs +++ b/tests/git_remote_nostr/list.rs | |||
| @@ -41,7 +41,7 @@ mod without_state_announcement { | |||
| 41 | let cli_tester_handle = std::thread::spawn(move || -> Result<()> { | 41 | let cli_tester_handle = std::thread::spawn(move || -> Result<()> { |
| 42 | let mut p = cli_tester_after_fetch(&git_repo)?; | 42 | let mut p = cli_tester_after_fetch(&git_repo)?; |
| 43 | p.send_line("list")?; | 43 | p.send_line("list")?; |
| 44 | p.expect(format!("fetching {} ref list over filesystem...\r\n", source_path).as_str())?; | 44 | p.expect(format!("fetching {source_path} ref list over filesystem...\r\n").as_str())?; |
| 45 | p.expect("list: connecting...\r\n\r\r\r")?; | 45 | p.expect("list: connecting...\r\n\r\r\r")?; |
| 46 | // println!("{}", p.expect_eventually("\r\n\r\n")?); | 46 | // println!("{}", p.expect_eventually("\r\n\r\n")?); |
| 47 | let res = p.expect_eventually("\r\n\r\n")?; | 47 | let res = p.expect_eventually("\r\n\r\n")?; |
| @@ -59,8 +59,8 @@ mod without_state_announcement { | |||
| 59 | .collect::<HashSet<String>>(), | 59 | .collect::<HashSet<String>>(), |
| 60 | HashSet::from([ | 60 | HashSet::from([ |
| 61 | "@refs/heads/main HEAD".to_string(), | 61 | "@refs/heads/main HEAD".to_string(), |
| 62 | format!("{} refs/heads/main", main_commit_id), | 62 | format!("{main_commit_id} refs/heads/main"), |
| 63 | format!("{} refs/heads/vnext", vnext_commit_id), | 63 | format!("{vnext_commit_id} refs/heads/vnext"), |
| 64 | ]), | 64 | ]), |
| 65 | ); | 65 | ); |
| 66 | Ok(()) | 66 | Ok(()) |
| @@ -120,7 +120,7 @@ mod with_state_announcement { | |||
| 120 | let mut p = cli_tester_after_fetch(&git_repo)?; | 120 | let mut p = cli_tester_after_fetch(&git_repo)?; |
| 121 | p.send_line("list")?; | 121 | p.send_line("list")?; |
| 122 | p.expect( | 122 | p.expect( |
| 123 | format!("fetching {} ref list over filesystem...\r\n", source_path).as_str(), | 123 | format!("fetching {source_path} ref list over filesystem...\r\n").as_str(), |
| 124 | )?; | 124 | )?; |
| 125 | p.expect("list: connecting...\r\n\r\r\r")?; | 125 | p.expect("list: connecting...\r\n\r\r\r")?; |
| 126 | // println!("{}", p.expect_eventually("\r\n\r\n")?); | 126 | // println!("{}", p.expect_eventually("\r\n\r\n")?); |
| @@ -135,8 +135,8 @@ mod with_state_announcement { | |||
| 135 | .collect::<HashSet<String>>(), | 135 | .collect::<HashSet<String>>(), |
| 136 | HashSet::from([ | 136 | HashSet::from([ |
| 137 | "@refs/heads/main HEAD".to_string(), | 137 | "@refs/heads/main HEAD".to_string(), |
| 138 | format!("{} refs/heads/main", main_commit_id), | 138 | format!("{main_commit_id} refs/heads/main"), |
| 139 | format!("{} refs/heads/example-branch", example_commit_id), | 139 | format!("{example_commit_id} refs/heads/example-branch"), |
| 140 | ]), | 140 | ]), |
| 141 | ); | 141 | ); |
| 142 | 142 | ||
| @@ -204,13 +204,12 @@ mod with_state_announcement { | |||
| 204 | let mut p = cli_tester_after_fetch(&git_repo)?; | 204 | let mut p = cli_tester_after_fetch(&git_repo)?; |
| 205 | p.send_line("list")?; | 205 | p.send_line("list")?; |
| 206 | p.expect( | 206 | p.expect( |
| 207 | format!("fetching {} ref list over filesystem...\r\n", source_path).as_str(), | 207 | format!("fetching {source_path} ref list over filesystem...\r\n").as_str(), |
| 208 | )?; | 208 | )?; |
| 209 | p.expect("list: connecting...\r\n\r\r\r")?; | 209 | p.expect("list: connecting...\r\n\r\r\r")?; |
| 210 | p.expect( | 210 | p.expect( |
| 211 | format!( | 211 | format!( |
| 212 | "WARNING: {} refs/heads/main is out of sync with nostr \r\n", | 212 | "WARNING: {source_path} refs/heads/main is out of sync with nostr \r\n" |
| 213 | source_path | ||
| 214 | ) | 213 | ) |
| 215 | .as_str(), | 214 | .as_str(), |
| 216 | )?; | 215 | )?; |
| @@ -231,8 +230,8 @@ mod with_state_announcement { | |||
| 231 | .collect::<HashSet<String>>(), | 230 | .collect::<HashSet<String>>(), |
| 232 | HashSet::from([ | 231 | HashSet::from([ |
| 233 | "@refs/heads/main HEAD".to_string(), | 232 | "@refs/heads/main HEAD".to_string(), |
| 234 | format!("{} refs/heads/main", main_original_commit_id), | 233 | format!("{main_original_commit_id} refs/heads/main"), |
| 235 | format!("{} refs/heads/example-branch", example_commit_id), | 234 | format!("{example_commit_id} refs/heads/example-branch"), |
| 236 | ]), | 235 | ]), |
| 237 | ); | 236 | ); |
| 238 | Ok(()) | 237 | Ok(()) |
| @@ -292,7 +291,7 @@ mod with_state_announcement { | |||
| 292 | let mut p = cli_tester_after_fetch(&git_repo)?; | 291 | let mut p = cli_tester_after_fetch(&git_repo)?; |
| 293 | p.send_line("list")?; | 292 | p.send_line("list")?; |
| 294 | p.expect( | 293 | p.expect( |
| 295 | format!("fetching {} ref list over filesystem...\r\n", source_path).as_str(), | 294 | format!("fetching {source_path} ref list over filesystem...\r\n").as_str(), |
| 296 | )?; | 295 | )?; |
| 297 | p.expect("list: connecting...\r\n\r\r\r")?; | 296 | p.expect("list: connecting...\r\n\r\r\r")?; |
| 298 | // println!("{}", p.expect_eventually("\r\n\r\n")?); | 297 | // println!("{}", p.expect_eventually("\r\n\r\n")?); |