about summary refs log tree commit diff
path: root/tvix/store
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-02-27T11·58+0100
committerflokli <flokli@flokli.de>2023-03-10T10·58+0000
commit52a5181ebac94f7b6d5a1acab182d8f7fcc59c8c (patch)
treecd6e969658f7879b7f5542f6a31c73f5c37d7d62 /tvix/store
parent092f8a7df8d2f194738761b140f93288ac1baa18 (diff)
refactor(tvix/store/tests/nar_renderer): only upload EMPTY_BLOB r/5931
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 <tvl@lahfa.xyz>
Diffstat (limited to 'tvix/store')
-rw-r--r--tvix/store/src/tests/nar_renderer.rs30
1 files changed, 14 insertions, 16 deletions
diff --git a/tvix/store/src/tests/nar_renderer.rs b/tvix/store/src/tests/nar_renderer.rs
index 4b51ba867eed..8c0f738b5143 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();
-
-        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();
-    }
+    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: EMPTY_BLOB_CONTENTS.len() as u32,
+                }],
+                ..Default::default()
+            },
+        )
+        .unwrap();
 
     directory_service.put(DIRECTORY_WITH_KEEP.clone()).unwrap();
     directory_service