Use lib.cartesianProducOfSets where lib.crossLists was used
This commit is contained in:
@@ -5,7 +5,11 @@
|
||||
|
||||
let
|
||||
inherit (import ../lib/testing-python.nix { inherit system pkgs; }) makeTest;
|
||||
in pkgs.lib.listToAttrs (pkgs.lib.crossLists (predictable: withNetworkd: {
|
||||
testCombinations = pkgs.lib.cartesianProductOfSets {
|
||||
predictable = [true false];
|
||||
withNetworkd = [true false];
|
||||
};
|
||||
in pkgs.lib.listToAttrs (builtins.map ({ predictable, withNetworkd }: {
|
||||
name = pkgs.lib.optionalString (!predictable) "un" + "predictable"
|
||||
+ pkgs.lib.optionalString withNetworkd "Networkd";
|
||||
value = makeTest {
|
||||
@@ -30,4 +34,4 @@ in pkgs.lib.listToAttrs (pkgs.lib.crossLists (predictable: withNetworkd: {
|
||||
machine.${if predictable then "fail" else "succeed"}("ip link show eth0")
|
||||
'';
|
||||
};
|
||||
}) [[true false] [true false]])
|
||||
}) testCombinations)
|
||||
|
||||
Reference in New Issue
Block a user