python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / nixos / tests / adguardhome.nix
blob5be69e22e5329abc35d726a76b0eefbfd9ada103
2   name = "adguardhome";
4   nodes = {
5     declarativeConf = { ... }: {
6       services.adguardhome = {
7         enable = true;
9         mutableSettings = false;
10         settings = {
11           schema_version = 0;
12           dns = {
13             bind_host = "0.0.0.0";
14             bootstrap_dns = "127.0.0.1";
15           };
16         };
17       };
18     };
20     mixedConf = { ... }: {
21       services.adguardhome = {
22         enable = true;
24         mutableSettings = true;
25         settings = {
26           schema_version = 0;
27           dns = {
28             bind_host = "0.0.0.0";
29             bootstrap_dns = "127.0.0.1";
30           };
31         };
32       };
33     };
34   };
36   testScript = ''
37     with subtest("Declarative config test, DNS will be reachable"):
38         declarativeConf.wait_for_unit("adguardhome.service")
39         declarativeConf.wait_for_open_port(53)
40         declarativeConf.wait_for_open_port(3000)
42     with subtest("Mixed config test, check whether merging works"):
43         mixedConf.wait_for_unit("adguardhome.service")
44         mixedConf.wait_for_open_port(53)
45         mixedConf.wait_for_open_port(3000)
46         # Test whether merging works properly, even if nothing is changed
47         mixedConf.systemctl("restart adguardhome.service")
48         mixedConf.wait_for_unit("adguardhome.service")
49         mixedConf.wait_for_open_port(3000)
50   '';