From 52a5181ebac94f7b6d5a1acab182d8f7fcc59c8c Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Mon, 27 Feb 2023 12:58:29 +0100 Subject: [PATCH] refactor(tvix/store/tests/nar_renderer): only upload EMPTY_BLOB This also uploaded HELLOWORLD_BLOB_CONTENTS before, but it's not referred from anywhere in the fixture. Change-Id: I823133afe0f08d18a59e2ac4e4d4bb7d34ce8a2b Reviewed-on: https://cl.tvl.fyi/c/depot/+/8158 Tested-by: BuildkiteCI Reviewed-by: raitobezarius --- tvix/store/src/tests/nar_renderer.rs | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/tvix/store/src/tests/nar_renderer.rs b/tvix/store/src/tests/nar_renderer.rs index 4b51ba867..8c0f738b5 100644 --- a/tvix/store/src/tests/nar_renderer.rs +++ b/tvix/store/src/tests/nar_renderer.rs @@ -191,22 +191,20 @@ fn test_complicated() { let directory_service = gen_directory_service(tmpdir.path()); // put all data into the stores. - for blob_contents in [HELLOWORLD_BLOB_CONTENTS, EMPTY_BLOB_CONTENTS] { - let digest = chunk_service.put(blob_contents.to_vec()).unwrap(); + let digest = chunk_service.put(EMPTY_BLOB_CONTENTS.to_vec()).unwrap(); - blob_service - .put( - &digest, - proto::BlobMeta { - chunks: vec![proto::blob_meta::ChunkMeta { - digest: digest.to_vec(), - size: blob_contents.len() as u32, - }], - ..Default::default() - }, - ) - .unwrap(); - } + blob_service + .put( + &digest, + proto::BlobMeta { + chunks: vec![proto::blob_meta::ChunkMeta { + digest: digest.to_vec(), + size: EMPTY_BLOB_CONTENTS.len() as u32, + }], + ..Default::default() + }, + ) + .unwrap(); directory_service.put(DIRECTORY_WITH_KEEP.clone()).unwrap(); directory_service