From f548fbd36b797dfe99775bb4bb507015cedafd5f Mon Sep 17 00:00:00 2001 From: Matt Keeter Date: Fri, 16 Feb 2024 10:10:17 -0500 Subject: [PATCH] Fix crucible-common tests --- Cargo.lock | 2 ++ common/Cargo.toml | 4 ++++ common/src/impacted_blocks.rs | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 7423afc56..5a2a5e2f4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -856,6 +856,7 @@ dependencies = [ "crucible-workspace-hack", "dropshot", "nix 0.27.1", + "proptest", "rusqlite", "rustls-pemfile 1.0.4", "schemars", @@ -867,6 +868,7 @@ dependencies = [ "slog-dtrace", "slog-term", "tempfile", + "test-strategy", "thiserror", "tokio-rustls 0.24.1", "toml 0.8.8", diff --git a/common/Cargo.toml b/common/Cargo.toml index 6b177ef08..eb0b392d5 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -28,5 +28,9 @@ uuid.workspace = true crucible-workspace-hack.workspace = true dropshot.workspace = true +[dev-dependencies] +proptest.workspace = true +test-strategy.workspace = true + [build-dependencies] vergen = { version = "8.2", features = ["cargo", "git", "git2", "rustc" ] } diff --git a/common/src/impacted_blocks.rs b/common/src/impacted_blocks.rs index 9a827a24b..fb450255c 100644 --- a/common/src/impacted_blocks.rs +++ b/common/src/impacted_blocks.rs @@ -696,7 +696,7 @@ mod test { #[strategy(1 ..= (u64::MAX / #extent_count as u64))] extent_size: u64, - #[strategy(crucible_common::MIN_SHIFT..=crucible_common::MAX_SHIFT)] + #[strategy(crate::MIN_SHIFT..=crate::MAX_SHIFT)] block_shift: u32, }