about summary refs log tree commit diff
path: root/modules/core
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2018-04-29 13:48:57 +0200
committeraszlig <aszlig@nix.build>2018-04-29 14:20:59 +0200
commit3ea85a699a65dbdd4f633d21e70be6859b0f3f8f (patch)
treeb012c153fa5455c71015334652f17b913a6e4c34 /modules/core
parentfaa65d1384a1bfd83f86d1005fe324c19f42001c (diff)
core/tests: Update upstream NixOS tests
New tests as of NixOS/nixpkgs@9df35787f16636628a2c7392cc4bfeff0e815242:

  buildbot, ceph, deluge, docker-edge, docker-tools,
  docker-tools-overlay, fwupd, gjs, iftop, kubernetes.dns,
  kubernetes.rbac, matrix-synapse, nix-ssh-serve, novacomd, openldap,
  plotinus, powerdns, predictable-interface-names, prosody, quagga,
  rabbitmq, rspamd, rxe, strongswan-swanctl, systemd, transmission,
  xautolock, xrdp, yabar

The main kubernetes test no longer exists and has been split into
kubernetes.dns and kubernetes.rbac in
NixOS/nixpkgs@709b6f664e472ae2075bbee83bfb1dd1ba95e0e7.

I also added a small hasPackage helper for gjs, which we're going to use
for packages in the system path very soon.

Signed-off-by: aszlig <aszlig@nix.build>
Diffstat (limited to 'modules/core')
-rw-r--r--modules/core/tests.nix95
1 files changed, 93 insertions, 2 deletions
diff --git a/modules/core/tests.nix b/modules/core/tests.nix
index 36e16e33..d1a4b898 100644
--- a/modules/core/tests.nix
+++ b/modules/core/tests.nix
@@ -8,6 +8,7 @@ let
   mkTest = attrs: if attrs.check then attrs.paths or [ attrs.path ] else [];
 
   anyAttrs = pred: cfg: any id (mapAttrsToList (const pred) cfg);
+  hasPackage = p: any (x: x.name == p.name) config.environment.systemPackages;
 
   upstreamTests = concatMap mkTest [
     { check = config.security.acme.certs != {};
@@ -34,9 +35,19 @@ let
     { check = true;
       path  = ["nixos" "boot-stage1"];
     }
+    { check = config.services.buildbot-master.enable
+           || config.services.buildbot-worker.enable;
+      path  = ["nixos" "buildbot"];
+    }
     { check = config.services.cadvisor.enable;
       path  = ["nixos" "cadvisor"];
     }
+    { check = config.services.ceph.enable
+           || config.services.ceph.mon.enable
+           || config.services.ceph.mgr.enable
+           || config.services.ceph.osd.enable;
+      path  = ["nixos" "ceph"];
+    }
     { check = config.services.cjdns.enable;
       path  = ["nixos" "cjdns"];
     }
@@ -91,11 +102,25 @@ let
     { check = config.services.couchdb.enable;
       path  = ["nixos" "couchdb"];
     }
+    { check = config.services.deluge.enable;
+      path  = ["nixos" "deluge"];
+    }
     { check = config.services.dnscrypt-proxy.enable;
       path  = ["nixos" "dnscrypt-proxy"];
     }
     { check = config.virtualisation.docker.enable;
-      path  = ["nixos" "docker"];
+      paths = [
+        ["nixos" "docker"]
+        ["nixos" "docker-tools"]
+      ];
+    }
+    { check = with config.virtualisation.docker; enable
+           && package.name == pkgs.docker-edge.name;
+      path  = ["nixos" "docker-edge"];
+    }
+    { check = config.virtualisation.docker.enable
+           && config.virtualisation.docker.storageDriver == "overlay";
+      path  = ["nixos" "docker-tools-overlay"];
     }
     { check = config.services.dovecot2.enable;
       path  = ["nixos" "dovecot"];
@@ -118,9 +143,15 @@ let
     { check = config.services.fleet.enable;
       path  = ["nixos" "fleet"];
     }
+    { check = config.services.fwupd.enable;
+      path  = ["nixos" "fwupd"];
+    }
     { check = config.services.gitolite.enable;
       path  = ["nixos" "gitolite"];
     }
+    { check = hasPackage pkgs.gnome-desktop-testing;
+      path  = ["nixos" "gjs"];
+    }
     { check = config.services.xserver.desktopManager.gnome3.enable;
       path  = ["nixos" "gnome3"];
     }
@@ -159,6 +190,9 @@ let
     { check = config.services.xserver.windowManager.i3.enable;
       path  = ["nixos" "i3wm"];
     }
+    { check = config.programs.iftop.enable;
+      path  = ["nixos" "iftop"];
+    }
     { check = config.boot.initrd.network.enable;
       path  = ["nixos" "initrdNetwork"];
     }
@@ -253,7 +287,10 @@ let
     { check = with config.services.kubernetes; apiserver.enable
            || scheduler.enable || controllerManager.enable || kubelet.enable
            || proxy.enable;
-      path  = ["nixos" "kubernetes"];
+      paths = [
+        ["nixos" "kubernetes" "dns"]
+        ["nixos" "kubernetes" "rbac"]
+      ];
     }
     { check = config.boot.kernelPackages.kernel.version
            == pkgs.linuxPackages_latest.kernel.version;
@@ -271,6 +308,9 @@ let
     { check = config.services.mathics.enable;
       path  = ["nixos" "mathics"];
     }
+    { check = config.services.matrix-synapse.enable;
+      path  = ["nixos" "matrix-synapse"];
+    }
     { check = config.services.mesos.master.enable
            || config.services.mesos.slave.enable;
       path  = ["nixos" "mesos"];
@@ -365,12 +405,21 @@ let
     { check = config.services.nginx.enable;
       path  = ["nixos" "nginx"];
     }
+    { check = config.nix.sshServe.enable;
+      path  = ["nixos" "nix-ssh-serve"];
+    }
+    { check = config.services.novacomd.enable;
+      path  = ["nixos" "novacomd"];
+    }
     { check = config.services.nsd.enable;
       path  = ["nixos" "nsd"];
     }
     { check = config.services.openssh.enable;
       path  = ["nixos" "openssh"];
     }
+    { check = config.services.openldap.enable;
+      path  = ["nixos" "openldap"];
+    }
     { check = let
         hasOCSubServiceType = any (y: y.serviceType == "owncloud");
         hasOCSubService = any (x: hasOCSubServiceType x.extraSubservices);
@@ -387,6 +436,9 @@ let
     { check = config.services.xserver.desktopManager.plasma5.enable;
       path  = ["nixos" "plasma5"];
     }
+    { check = config.programs.plotinus.enable;
+      path  = ["nixos" "plotinus"];
+    }
     { check = config.services.postgresql.enable;
       path  = let
         filterPg = name: drv: hasPrefix "postgresql" name
@@ -394,26 +446,47 @@ let
         pgPackage = head (attrNames (filterAttrs filterPg pkgs));
       in ["nixos" "postgresql" pgPackage];
     }
+    { check = config.services.powerdns.enable;
+      path  = ["nixos" "powerdns"];
+    }
+    { check = config.networking.usePredictableInterfaceNames;
+      path  = ["nixos" "predictable-interface-names"];
+    }
     { check = config.services.printing.enable;
       path  = ["nixos" "printing"];
     }
     { check = config.services.prometheus.enable;
       path  = ["nixos" "prometheus"];
     }
+    { check = config.services.prosody.enable;
+      path  = ["nixos" "prosody"];
+    }
     { check = config.services.httpd.enable
            && elem "proxy_balancer" config.services.httpd.extraModules;
       path  = ["nixos" "proxy"];
     }
+    { check = config.services.quagga.ospf.enable;
+      path  = ["nixos" "quagga"];
+    }
     { check = config.hardware.opengl.driSupport
            && config.services.xserver.enable;
       path  = ["nixos" "quake3"];
     }
+    { check = config.services.rabbitmq.enable;
+      path  = ["nixos" "rabbitmq"];
+    }
     { check = config.services.radicale.enable;
       path  = ["nixos" "radicale"];
     }
+    { check = config.services.rspamd.enable;
+      path  = ["nixos" "rspamd"];
+    }
     { check = true;
       path  = ["nixos" "runInMachine"];
     }
+    { check = config.networking.rxe.enable;
+      path  = ["nixos" "rxe"];
+    }
     { check = config.services.samba.enable;
       path  = ["nixos" "samba"];
     }
@@ -438,18 +511,27 @@ let
     { check = config.services.statsd.enable;
       path  = ["nixos" "statsd"];
     }
+    { check = config.services.strongswan-swanctl.enable;
+      path  = ["nixos" "strongswan-swanctl"];
+    }
     { check = config.security.sudo.enable;
       path  = ["nixos" "sudo"];
     }
     { check = true;
       path  = ["nixos" "switchTest"];
     }
+    { check = true;
+      path  = ["nixos" "systemd"];
+    }
     { check = config.services.taskserver.enable;
       path  = ["nixos" "taskserver"];
     }
     { check = config.services.tomcat.enable;
       path  = ["nixos" "tomcat"];
     }
+    { check = config.services.transmission.enable;
+      path  = ["nixos" "transmission"];
+    }
     { check = config.services.udisks2.enable;
       path  = ["nixos" "udisks2"];
     }
@@ -476,12 +558,21 @@ let
       in config.services.httpd.enable && hasWordPress;
       path  = ["nixos" "wordpress"];
     }
+    { check = config.services.xserver.xautolock.enable;
+      path  = ["nixos" "xautolock"];
+    }
     { check = config.services.xserver.desktopManager.xfce.enable;
       path  = ["nixos" "xfce"];
     }
     { check = config.services.xserver.windowManager.xmonad.enable;
       path  = ["nixos" "xmonad"];
     }
+    { check = config.services.xrdp.enable;
+      path  = ["nixos" "xrdp"];
+    }
+    { check = config.programs.yabar.enable;
+      path  = ["nixos" "yabar"];
+    }
     { check = config.services.zookeeper.enable;
       path  = ["nixos" "zookeeper"];
     }