kubernetes: add passthru tests

Also defensively quote a path and reformat a comment to trigger the
right review.
This commit is contained in:
Alexandru Scvortov 2021-07-27 16:11:32 +01:00
parent 52168faa5b
commit b9acd426df
2 changed files with 11 additions and 3 deletions

View file

@ -189,7 +189,7 @@ in
# manually paste it in place. Just symlink.
# otherwise, create the target file, ready for users to insert the token
mkdir -p $(dirname ${certmgrAPITokenPath})
mkdir -p "$(dirname "${certmgrAPITokenPath}")"
if [ -f "${cfsslAPITokenPath}" ]; then
ln -fs "${cfsslAPITokenPath}" "${certmgrAPITokenPath}"
else

View file

@ -7,6 +7,7 @@
, makeWrapper
, rsync
, installShellFiles
, nixosTests
, components ? [
"cmd/kubelet"
@ -66,8 +67,8 @@ stdenv.mkDerivation rec {
install -D build/pause/linux/pause -t $pause/bin
installManPage docs/man/man1/*.[1-9]
# Unfortunately, kube-addons-main.sh only looks for the lib file in either the current working dir
# or in /opt. We have to patch this for now.
# Unfortunately, kube-addons-main.sh only looks for the lib file in either the
# current working dir or in /opt. We have to patch this for now.
substitute cluster/addons/addon-manager/kube-addons-main.sh $out/bin/kube-addons \
--subst-var out
@ -95,4 +96,11 @@ stdenv.mkDerivation rec {
maintainers = with maintainers; [ johanot offline saschagrunert ];
platforms = platforms.unix;
};
passthru.tests = with nixosTests.kubernetes; {
dns-single-node = dns.singlenode;
dns-multi-node = dns.multinode;
rbac-single-node = rbac.singlenode;
rbac-multi-node = rbac.multinode;
};
}