fix(ci): bound platform test and dependency checks

- run Windows integration targets without the broken Tauri lib harness
- retain Windows cache and web-seed regressions in runnable targets
- bound Linux apt retries, network waits, and job duration
This commit is contained in:
NimBold
2026-08-19 12:47:16 +03:30
parent 9418aa5564
commit dd04ed40d6
5 changed files with 158 additions and 72 deletions
-62
View File
@@ -1496,68 +1496,6 @@ mod tests {
));
}
#[tokio::test]
async fn canonical_cache_round_trip_rejects_invalid_bytes_and_source_metadata() {
let app = tauri::test::mock_builder()
.build(tauri::test::mock_context(tauri::test::noop_assets()))
.expect("mock app");
let bytes = b"d4:infod6:lengthi5e4:name4:testee";
let parsed = parse_torrent_bytes(bytes).expect("test torrent should parse");
let path = managed_torrent_info_hash_path(app.handle(), &parsed.info_hash)
.expect("canonical cache path should resolve");
let _ = tokio::fs::remove_file(&path).await;
assert!(
cache_torrent_info_hash(app.handle(), bytes)
.await
.expect("canonical cache write should succeed")
.is_some()
);
assert_eq!(
read_cached_torrent_by_info_hash(app.handle(), &parsed.info_hash)
.await
.expect("canonical cache read should succeed"),
Some(bytes.to_vec())
);
tokio::fs::write(&path, b"not a torrent")
.await
.expect("invalid cache fixture should be writable");
assert!(
read_cached_torrent_by_info_hash(app.handle(), &parsed.info_hash)
.await
.expect("invalid cache should be handled")
.is_none()
);
assert!(!path.exists());
let tracker_bytes = b"d8:announce32:https://tracker.example/announce4:infod6:lengthi5e4:name4:testee";
let tracker_hash = parse_torrent_bytes(tracker_bytes)
.expect("tracker-bearing torrent should parse")
.info_hash;
assert!(
cache_torrent_info_hash(app.handle(), tracker_bytes)
.await
.expect("tracker metadata should be reusable")
.is_some()
);
assert_eq!(
read_cached_torrent_by_info_hash(app.handle(), &tracker_hash)
.await
.expect("tracker cache should be readable"),
Some(tracker_bytes.to_vec())
);
assert!(
cache_torrent_info_hash(
app.handle(),
b"d4:infod6:lengthi5e4:name4:teste8:url-list22:https://example.test/ae"
)
.await
.expect("web-seed metadata should be handled")
.is_none()
);
}
#[test]
fn canonicalizes_base32_magnet_hashes_to_hex() {
let parsed = inspect_source(