feat(tvix/boot/tests): add preStart parameter
This allows running some code before tvix-daemon is started up, which is helpful to spin up some mock services. Change-Id: Ie7b6eaaf76c40def493f50879ee5255fd1ebd2fe Reviewed-on: https://cl.tvl.fyi/c/depot/+/11893 Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com> Autosubmit: flokli <flokli@flokli.de>
This commit is contained in:
parent
0fd4a1a655
commit
50ed7f27d0
1 changed files with 6 additions and 0 deletions
|
@ -23,6 +23,10 @@ let
|
||||||
|
|
||||||
, importPathName ? null
|
, importPathName ? null
|
||||||
|
|
||||||
|
# Commands to run before starting the tvix-daemon. Useful to provide
|
||||||
|
# auxillary mock services.
|
||||||
|
, preStart ? ""
|
||||||
|
|
||||||
# The cmdline to pass to the VM.
|
# The cmdline to pass to the VM.
|
||||||
# Defaults to tvix.find, which lists all files in the store.
|
# Defaults to tvix.find, which lists all files in the store.
|
||||||
, vmCmdline ? "tvix.find"
|
, vmCmdline ? "tvix.find"
|
||||||
|
@ -51,6 +55,8 @@ let
|
||||||
# Ensure we can construct http clients.
|
# Ensure we can construct http clients.
|
||||||
export SSL_CERT_FILE="${pkgs.cacert.out}/etc/ssl/certs/ca-bundle.crt"
|
export SSL_CERT_FILE="${pkgs.cacert.out}/etc/ssl/certs/ca-bundle.crt"
|
||||||
|
|
||||||
|
${preStart}
|
||||||
|
|
||||||
# Start the tvix daemon, listening on a unix socket.
|
# Start the tvix daemon, listening on a unix socket.
|
||||||
BLOB_SERVICE_ADDR=${blobServiceAddr} \
|
BLOB_SERVICE_ADDR=${blobServiceAddr} \
|
||||||
DIRECTORY_SERVICE_ADDR=${directoryServiceAddr} \
|
DIRECTORY_SERVICE_ADDR=${directoryServiceAddr} \
|
||||||
|
|
Loading…
Reference in a new issue