lol

nixos/portable/test.nix: Fix test

+17 -9
+17 -9
nixos/modules/system/service/portable/test.nix
··· 7 7 8 8 portable-lib = import ./lib.nix { inherit lib; }; 9 9 10 + configured = portable-lib.configure { 11 + serviceManagerPkgs = throw "do not use pkgs in this test"; 12 + extraRootModules = [ ]; 13 + extraRootSpecialArgs = { }; 14 + }; 15 + 10 16 dummyPkg = 11 17 name: 12 18 derivation { ··· 79 85 modules = [ 80 86 { 81 87 options.services = mkOption { 82 - type = types.attrsOf ( 83 - types.submoduleWith { 84 - class = "service"; 85 - modules = [ 86 - ./service.nix 87 - ]; 88 - } 89 - ); 88 + type = types.attrsOf configured.serviceSubmodule; 90 89 }; 91 90 } 92 91 exampleConfig 93 92 ]; 94 93 }; 95 94 95 + filterEval = 96 + config: 97 + lib.optionalAttrs (config ? process) { 98 + inherit (config) assertions warnings process; 99 + } 100 + // { 101 + services = lib.mapAttrs (k: filterEval) config.services; 102 + }; 103 + 96 104 test = 97 105 assert 98 - exampleEval.config == { 106 + filterEval exampleEval.config == { 99 107 services = { 100 108 service1 = { 101 109 process = {