feat(tvix/boot/tests): add simple objectstore test
This makes BLOB_SERVICE_ADDR configurable, and creates a flavor setting it to objectstore+file://$PWD/blobs. Change-Id: I68c21367f83f68b4dee701c5678f438c7d8fbe43 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11137 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI
This commit is contained in:
parent
f22d5b3d11
commit
514edc2ea5
1 changed files with 30 additions and 25 deletions
|
@ -1,10 +1,11 @@
|
|||
{ depot, pkgs, ... }:
|
||||
|
||||
depot.nix.readTree.drvTargets {
|
||||
let
|
||||
# Seed a tvix-store with the tvix docs, then start a VM, ask it to list all
|
||||
# files in /nix/store, and ensure the store path is present, which acts as a
|
||||
# nice smoketest.
|
||||
docs = pkgs.stdenv.mkDerivation {
|
||||
mkBootTest = blobServiceAddr:
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "run-vm";
|
||||
nativeBuildInputs = [
|
||||
depot.tvix.store
|
||||
|
@ -14,7 +15,7 @@ depot.nix.readTree.drvTargets {
|
|||
touch $out
|
||||
|
||||
# Configure tvix to put data in the local working directory
|
||||
export BLOB_SERVICE_ADDR=sled://$PWD/blobs.sled
|
||||
export BLOB_SERVICE_ADDR=${blobServiceAddr}
|
||||
export DIRECTORY_SERVICE_ADDR=sled://$PWD/directories.sled
|
||||
export PATH_INFO_SERVICE_ADDR=sled://$PWD/pathinfo.sled
|
||||
|
||||
|
@ -32,4 +33,8 @@ depot.nix.readTree.drvTargets {
|
|||
'';
|
||||
requiredSystemFeatures = [ "kvm" ];
|
||||
};
|
||||
in
|
||||
depot.nix.readTree.drvTargets {
|
||||
docs-sled = (mkBootTest "sled://$PWD/blobs.sled");
|
||||
docs-objectstore-local = (mkBootTest "objectstore+file://$PWD/blobs");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue