From e7279b6063b3a4675f8ed37c797254de8a0c79e9 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Mon, 27 Feb 2023 09:12:09 +0100 Subject: refactor(tvix/store/tests): move fixtures into separate module Change-Id: I362dbf0899e4dc42114fd2e6a8fa7f537e9ea138 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8156 Tested-by: BuildkiteCI Reviewed-by: raitobezarius --- tvix/store/src/blobreader.rs | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'tvix/store/src/blobreader.rs') diff --git a/tvix/store/src/blobreader.rs b/tvix/store/src/blobreader.rs index 5fb26228be65..b4e56d909b26 100644 --- a/tvix/store/src/blobreader.rs +++ b/tvix/store/src/blobreader.rs @@ -134,23 +134,15 @@ mod tests { use super::BlobReader; use crate::chunkservice::ChunkService; use crate::proto; + use crate::tests::fixtures::DUMMY_DATA_1; + use crate::tests::fixtures::DUMMY_DATA_2; + use crate::tests::fixtures::DUMMY_DIGEST; use crate::tests::utils::gen_chunk_service; - use lazy_static::lazy_static; use std::io::Cursor; use std::io::Read; use std::io::Write; use tempfile::TempDir; - lazy_static! { - static ref DUMMY_DIGEST: Vec = vec![ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - ]; - static ref DUMMY_DATA_1: Vec = vec![0x01, 0x02, 0x03]; - static ref DUMMY_DATA_2: Vec = vec![0x04, 0x05]; - } - #[test] /// reading from a blobmeta with zero chunks should produce zero bytes. fn empty_blobmeta() -> anyhow::Result<()> { -- cgit 1.4.1