Skip to content

Commit

Permalink
Merge pull request #1006 from flyingcircusio/PL-132482-router-firewal…
Browse files Browse the repository at this point in the history
…l-tests

[21.05] Test for firewall differences between specialisations in router role
  • Loading branch information
dpausp committed May 8, 2024
2 parents 7b5a896 + 08670f1 commit 2c0e92c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/router/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,14 @@ in
router.execute("sed -i 'c 1' /etc/keepalived/stop")
router.wait_until_succeeds("cat /tmp/agent-mock-called")
with subtest("Firewall configuration should not differ between primary and secondary"):
primary_system = router.r.primary_system
secondary_system = router.r.secondary_system
primary_firewall = router.execute(f"cat {primary_system}/etc/systemd/system/firewall.service")
secondary_firewall = router.execute(f"cat {secondary_system}/etc/systemd/system/firewall.service")
assert primary_firewall[1] == secondary_firewall[1], "firewall configuration differs between primary and secondary system"
print(router.succeed("journalctl -xb -u keepalived"))
'';
};
Expand Down

0 comments on commit 2c0e92c

Please sign in to comment.