nixos/tests/kanidm: bind certs path to fix ofborg tests

provision # [    8.223448] (kanidmd)[819]: kanidm.service: Failed to set up mount namespacing: /ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/ofborg-evaluator-1/nixos/tests/common/acme/server:
No such file or directory

(cherry picked from commit b93f6e4acd)
This commit is contained in:
Adam Stephens 2024-08-22 10:08:17 -04:00
parent f10dac3c89
commit 00abdbc620
No known key found for this signature in database

View File

@ -6,6 +6,13 @@ import ./make-test-python.nix ({ pkgs, ... }:
testCredentials = { testCredentials = {
password = "Password1_cZPEwpCWvrReripJmAZdmVIZd8HHoHcl"; password = "Password1_cZPEwpCWvrReripJmAZdmVIZd8HHoHcl";
}; };
# copy certs to store to work around mount namespacing
certsPath = pkgs.runCommandNoCC "snakeoil-certs" { } ''
mkdir $out
cp ${certs."${serverDomain}".cert} $out/snakeoil.crt
cp ${certs."${serverDomain}".key} $out/snakeoil.key
'';
in in
{ {
name = "kanidm"; name = "kanidm";
@ -19,8 +26,8 @@ import ./make-test-python.nix ({ pkgs, ... }:
domain = serverDomain; domain = serverDomain;
bindaddress = "[::]:443"; bindaddress = "[::]:443";
ldapbindaddress = "[::1]:636"; ldapbindaddress = "[::1]:636";
tls_chain = certs."${serverDomain}".cert; tls_chain = "${certsPath}/snakeoil.crt";
tls_key = certs."${serverDomain}".key; tls_key = "${certsPath}/snakeoil.key";
}; };
}; };