about summary refs log tree commit diff
path: root/tvix/glue/src/tests
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-04-29T12·39+0300
committerflokli <flokli@flokli.de>2024-04-29T21·13+0000
commitfab9a0727428d9bd999bf78381b0c51e4c4f797b (patch)
treed4ec7dddd28ff708cc205bf330bdae449ae36f59 /tvix/glue/src/tests
parent499075a84fd2dc2f1ac7f1708129c9f9eef703bb (diff)
feat(tvix/glue/tests): wrap TvixStoreIO with TvixIO r/8036
This makes `<nix/fetchurl.nix>` available in the testsuite.

Change-Id: I04657b227c539edec86e5b6033e1016adcfce244
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11537
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Connor Brewster <cbrewster@hey.com>
Diffstat (limited to 'tvix/glue/src/tests')
-rw-r--r--tvix/glue/src/tests/mod.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/tvix/glue/src/tests/mod.rs b/tvix/glue/src/tests/mod.rs
index e66f484e3dad..f18cae37206e 100644
--- a/tvix/glue/src/tests/mod.rs
+++ b/tvix/glue/src/tests/mod.rs
@@ -14,6 +14,7 @@ use rstest::rstest;
 
 use crate::{
     builtins::{add_derivation_builtins, add_fetcher_builtins, add_import_builtins},
+    tvix_io::TvixIO,
     tvix_store_io::TvixStoreIO,
 };
 
@@ -50,7 +51,11 @@ fn eval_test(code_path: PathBuf, expect_success: bool) {
         Arc::new(DummyBuildService::default()),
         tokio_runtime.handle().clone(),
     ));
-    let mut eval = tvix_eval::Evaluation::new(tvix_store_io.clone() as Rc<dyn EvalIO>, true);
+    // Wrap with TvixIO, so <nix/fetchurl.nix can be imported.
+    let mut eval = tvix_eval::Evaluation::new(
+        Box::new(TvixIO::new(tvix_store_io.clone() as Rc<dyn EvalIO>)) as Box<dyn EvalIO>,
+        true,
+    );
 
     eval.strict = true;
     add_derivation_builtins(&mut eval, tvix_store_io.clone());