module-eval: read the inet table and the dnsmasq script as the fixture renders them
This commit is contained in:
parent
70179b6c1f
commit
1875181d59
1 changed files with 6 additions and 4 deletions
|
|
@ -1545,7 +1545,9 @@ let
|
||||||
name = "the default egress table logs the bridge's forwarded flows and blocks none";
|
name = "the default egress table logs the bridge's forwarded flows and blocks none";
|
||||||
ok =
|
ok =
|
||||||
let
|
let
|
||||||
text = bare.services.hyperhive.network.egress.ruleset;
|
text = lib.head (
|
||||||
|
lib.splitString "table bridge hive_egress {" bare.services.hyperhive.network.egress.ruleset
|
||||||
|
);
|
||||||
chain = lib.last (lib.splitString "chain forward" text);
|
chain = lib.last (lib.splitString "chain forward" text);
|
||||||
rules = lib.filter (l: l != "") (map lib.trim (lib.splitString "\n" chain));
|
rules = lib.filter (l: l != "") (map lib.trim (lib.splitString "\n" chain));
|
||||||
idx = pat: lib.lists.findFirstIndex (lib.hasInfix pat) 1000 rules;
|
idx = pat: lib.lists.findFirstIndex (lib.hasInfix pat) 1000 rules;
|
||||||
|
|
@ -1646,9 +1648,9 @@ let
|
||||||
&& lib.hasInfix "egress-pin %i" pin.serviceConfig.ExecStart
|
&& lib.hasInfix "egress-pin %i" pin.serviceConfig.ExecStart
|
||||||
&& lib.hasInfix ''KERNEL=="vb-*"'' bare.services.udev.extraRules
|
&& lib.hasInfix ''KERNEL=="vb-*"'' bare.services.udev.extraRules
|
||||||
&& lib.hasInfix "hive-egress-pin@%k.service" bare.services.udev.extraRules
|
&& lib.hasInfix "hive-egress-pin@%k.service" bare.services.udev.extraRules
|
||||||
&&
|
&& lib.elem (toString bare.services.hyperhive.network.egress.leaseScript) (
|
||||||
bare.services.dnsmasq.settings.dhcp-script
|
lib.toList bare.services.dnsmasq.settings.dhcp-script
|
||||||
== toString bare.services.hyperhive.network.egress.leaseScript
|
)
|
||||||
&& !(centralToggleOff.systemd.services ? "hive-egress-pin@")
|
&& !(centralToggleOff.systemd.services ? "hive-egress-pin@")
|
||||||
&& !(centralToggleOff.systemd ? timers && centralToggleOff.systemd.timers ? hive-egress-pin);
|
&& !(centralToggleOff.systemd ? timers && centralToggleOff.systemd.timers ? hive-egress-pin);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue