refactor(tvix): move service addrs into shared clap struct

Change-Id: I7cab29ecfa1823c2103b4c47b7d784bc31459d55
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12008
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: yuka <yuka@yuka.dev>
This commit is contained in:
Yureka 2024-07-21 16:41:09 +02:00 committed by yuka
parent 6774d9c59c
commit 67335c41b7
12 changed files with 132 additions and 149 deletions

View file

@ -60,12 +60,13 @@ mod tests {
use crate::tvix_store_io::TvixStoreIO;
use super::{add_derivation_builtins, add_fetcher_builtins, add_import_builtins};
use clap::Parser;
use nix_compat::store_path::hash_placeholder;
use rstest::rstest;
use tempfile::TempDir;
use tvix_build::buildservice::DummyBuildService;
use tvix_eval::{EvalIO, EvaluationResult};
use tvix_store::utils::construct_services;
use tvix_store::utils::{construct_services, ServiceUrlsMemory};
/// evaluates a given nix expression and returns the result.
/// Takes care of setting up the evaluator so it knows about the
@ -74,7 +75,9 @@ mod tests {
// We assemble a complete store in memory.
let runtime = tokio::runtime::Runtime::new().expect("Failed to build a Tokio runtime");
let (blob_service, directory_service, path_info_service, nar_calculation_service) = runtime
.block_on(async { construct_services("memory://", "memory://", "memory://").await })
.block_on(async {
construct_services(ServiceUrlsMemory::parse_from(std::iter::empty::<&str>())).await
})
.expect("Failed to construct store services in memory");
let io = Rc::new(TvixStoreIO::new(