Merge pull request #131694 from scvalex/enable-kubernetes-passthru-tests

kubernetes: enable passthru tests
This commit is contained in:
Sandro 2021-07-28 11:14:35 +00:00 committed by GitHub
commit ebb592a04c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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;
};
}