Fix all remaining test failures
Some checks failed
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled

- archive::metadata: add failed_files to test_extract_result
- archive::tests: use TempDir for validate_extraction_path test
- provider::sqlite: fix db path using CARGO_MANIFEST_DIR/../data/auth.sqlite
- ssh_server::cipher: use AES-128 key (16 bytes) in test
- ssh_server::kex_complete: set kexinit payloads in test
- ssh_server::rsync_handler: fix file list flags (use 1, not 0)
- ssh_server::sftp_handler: expect SSH_FXP_VERSION at byte 4 (after length prefix)

All 135 tests now pass
This commit is contained in:
Warren
2026-06-19 00:48:53 +08:00
parent 5c89b0e169
commit 68472e0fb7
7 changed files with 45 additions and 23 deletions

View File

@@ -166,6 +166,7 @@ mod tests {
let result_with_failure = ExtractResult {
total_files: 10,
success_files: 8,
failed_files: vec![PathBuf::from("failed.txt")],
..Default::default()
};

View File

@@ -112,14 +112,15 @@ mod core_format_tests {
#[test]
fn test_validate_extraction_path_safe() {
let base = PathBuf::from("/tmp/extract");
let temp_dir = TempDir::new().unwrap();
let base = temp_dir.path();
let safe_path = PathBuf::from("safe/file.txt");
let result = validate_extraction_path(&safe_path, &base);
let result = validate_extraction_path(&safe_path, base);
assert!(result.is_ok());
let resolved = result.unwrap();
assert!(resolved.starts_with(&base));
assert!(resolved.starts_with(base));
}
#[test]