Skip to content

Commit da5356c

Browse files
committed
test: update archive test assertions to be platform specific
1 parent 93ecb57 commit da5356c

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

postgresql_archive/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
//! let url = theseus::URL;
3030
//! let (archive_version, archive) = get_archive(url, &VersionReq::STAR).await?;
3131
//! let out_dir = std::env::temp_dir();
32-
//! extract(url, &archive, &out_dir).await
32+
//! let files = extract(url, &archive, &out_dir).await?;
33+
//! Ok(())
3334
//! }
3435
//! ```
3536
//!

postgresql_archive/tests/archive.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,14 @@ async fn test_get_archive_and_extract() -> anyhow::Result<()> {
3333

3434
let out_dir = tempfile::tempdir()?.path().to_path_buf();
3535
let files = extract(url, &archive, &out_dir).await?;
36+
#[cfg(all(target_os = "linux", target_arch = "x86_64"))]
37+
assert_eq!(1_312, files.len());
38+
#[cfg(all(target_os = "macos", target_arch = "aarch64"))]
3639
assert_eq!(1_271, files.len());
40+
#[cfg(all(target_os = "macos", target_arch = "x86_64"))]
41+
assert_eq!(1_271, files.len());
42+
#[cfg(all(target_os = "windows", target_arch = "x86_64"))]
43+
assert_eq!(3_120, files.len());
3744
remove_dir_all(&out_dir)?;
3845
Ok(())
3946
}

0 commit comments

Comments
 (0)