firewall/nftables: Add support for include files
Change-Id: Ibeebf4e764cab175bac6ca21485526569c261123
diff --git a/tests/sysrepo-firewall.cpp b/tests/sysrepo-firewall.cpp
index 2873056..2be2e00 100644
--- a/tests/sysrepo-firewall.cpp
+++ b/tests/sysrepo-firewall.cpp
@@ -38,6 +38,12 @@
srSess.applyChanges(TIMEOUT);
MockNft nft;
+ SECTION("include files")
+ {
+ REQUIRE_CALL(nft, consumeConfig(NFTABLES_OUTPUT_START + "include \"/some/file\"\n"));
+ velia::firewall::SysrepoFirewall fwWithIncludes(srSess, [&nft] (const std::string& config) {nft.consumeConfig(config);}, {"/some/file"});
+ }
+
REQUIRE_CALL(nft, consumeConfig(NFTABLES_OUTPUT_START));
velia::firewall::SysrepoFirewall fw(srSess, [&nft] (const std::string& config) {nft.consumeConfig(config);});
std::string inputData;