mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 17:33:09 +00:00
62ce6f2c9d
https://community.ui.com/releases/UniFi-Network-Application-7-0-20/3e4a4099-c063-42f6-8e21-5fb2c99fcea9 Since that's a release candidate, unifiLTS remains unchanged.
37 lines
860 B
Nix
37 lines
860 B
Nix
# Test UniFi controller
|
|
|
|
{ system ? builtins.currentSystem
|
|
, config ? { allowUnfree = true; }
|
|
, pkgs ? import ../.. { inherit system config; }
|
|
}:
|
|
|
|
with import ../lib/testing-python.nix { inherit system pkgs; };
|
|
with pkgs.lib;
|
|
|
|
let
|
|
makeAppTest = unifi: makeTest {
|
|
name = "unifi-controller-${unifi.version}";
|
|
meta = with pkgs.lib.maintainers; {
|
|
maintainers = [ patryk27 zhaofengli ];
|
|
};
|
|
|
|
nodes.server = {
|
|
services.unifi = {
|
|
enable = true;
|
|
unifiPackage = unifi;
|
|
openFirewall = false;
|
|
};
|
|
};
|
|
|
|
testScript = ''
|
|
server.wait_for_unit("unifi.service")
|
|
server.wait_until_succeeds("curl -Lk https://localhost:8443 >&2", timeout=300)
|
|
'';
|
|
};
|
|
in with pkgs; {
|
|
unifiLTS = makeAppTest unifiLTS;
|
|
unifi5 = makeAppTest unifi5;
|
|
unifi6 = makeAppTest unifi6;
|
|
unifi7 = makeAppTest unifi7;
|
|
}
|