mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-15 02:03:01 +00:00
709b6f664e
* Fix reference CNI plugins * The plugins were split out of the upstream cni repo around version 0.6.0 * Fix RBAC and DNS tests * Fix broken apiVersion fields * Change plugin linking to look in ${package}/bin rather than ${package.plugins} * Initial work towards a working e2e test * Test still fails, but at least the expression evaluates now Continues @srhb's work in #37199 Fixes #37199
41 lines
1.2 KiB
Nix
41 lines
1.2 KiB
Nix
{ system ? builtins.currentSystem, pkgs ? import <nixpkgs> { inherit system; } }:
|
|
with import ./base.nix { inherit system; };
|
|
let
|
|
domain = "my.zyx";
|
|
certs = import ./certs.nix { externalDomain = domain; kubelets = ["machine1" "machine2"]; };
|
|
kubeconfig = pkgs.writeText "kubeconfig.json" (builtins.toJSON {
|
|
apiVersion = "v1";
|
|
kind = "Config";
|
|
clusters = [{
|
|
name = "local";
|
|
cluster.certificate-authority = "${certs.master}/ca.pem";
|
|
cluster.server = "https://api.${domain}";
|
|
}];
|
|
users = [{
|
|
name = "kubelet";
|
|
user = {
|
|
client-certificate = "${certs.admin}/admin.pem";
|
|
client-key = "${certs.admin}/admin-key.pem";
|
|
};
|
|
}];
|
|
contexts = [{
|
|
context = {
|
|
cluster = "local";
|
|
user = "kubelet";
|
|
};
|
|
current-context = "kubelet-context";
|
|
}];
|
|
});
|
|
|
|
base = {
|
|
name = "e2e";
|
|
inherit domain certs;
|
|
test = ''
|
|
$machine1->succeed("e2e.test -kubeconfig ${kubeconfig} -provider local -ginkgo.focus '\\[Conformance\\]' -ginkgo.skip '\\[Flaky\\]|\\[Serial\\]'");
|
|
'';
|
|
};
|
|
in {
|
|
singlenode = mkKubernetesSingleNodeTest base;
|
|
multinode = mkKubernetesMultiNodeTest base;
|
|
}
|