about summary refs log tree commit diff
path: root/tvix/store/src/proto/tests/grpc_blobservice.rs
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-02-27T08·12+0100
committerflokli <flokli@flokli.de>2023-03-10T10·58+0000
commite7279b6063b3a4675f8ed37c797254de8a0c79e9 (patch)
treef1eec4e519af00e8798eeacd76919f696c13e557 /tvix/store/src/proto/tests/grpc_blobservice.rs
parent28a862976bd43912e0e5dc16e8919590c36f4cf0 (diff)
refactor(tvix/store/tests): move fixtures into separate module r/5929
Change-Id: I362dbf0899e4dc42114fd2e6a8fa7f537e9ea138
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8156
Tested-by: BuildkiteCI
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Diffstat (limited to 'tvix/store/src/proto/tests/grpc_blobservice.rs')
-rw-r--r--tvix/store/src/proto/tests/grpc_blobservice.rs12
1 files changed, 1 insertions, 11 deletions
diff --git a/tvix/store/src/proto/tests/grpc_blobservice.rs b/tvix/store/src/proto/tests/grpc_blobservice.rs
index b409fc3ea3c0..4ea367cbdc86 100644
--- a/tvix/store/src/proto/tests/grpc_blobservice.rs
+++ b/tvix/store/src/proto/tests/grpc_blobservice.rs
@@ -3,21 +3,11 @@ use crate::chunkservice::ChunkService;
 use crate::proto::blob_meta::ChunkMeta;
 use crate::proto::blob_service_server::BlobService as GRPCBlobService;
 use crate::proto::{BlobChunk, GRPCBlobServiceWrapper, ReadBlobRequest, StatBlobRequest};
+use crate::tests::fixtures::{BLOB_A, BLOB_A_DIGEST, BLOB_B, BLOB_B_DIGEST};
 use crate::tests::utils::{gen_blob_service, gen_chunk_service};
-use lazy_static::lazy_static;
 use std::path::Path;
 use tempfile::TempDir;
 
-lazy_static! {
-    // 2 bytes
-    static ref BLOB_A: Vec<u8> = vec![0x00, 0x01];
-    static ref BLOB_A_DIGEST: Vec<u8> = blake3::hash(&BLOB_A).as_bytes().to_vec();
-
-    // 1MB
-    static ref BLOB_B: Vec<u8> = (0..255).collect::<Vec<u8>>().repeat(4 * 1024);
-    static ref BLOB_B_DIGEST: Vec<u8> = blake3::hash(&BLOB_B).as_bytes().to_vec();
-}
-
 fn gen_grpc_blob_service(
     p: &Path,
 ) -> GRPCBlobServiceWrapper<