summaryrefslogtreecommitdiff
path: root/server/FirewallControllerTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'server/FirewallControllerTest.cpp')
-rw-r--r--server/FirewallControllerTest.cpp48
1 files changed, 0 insertions, 48 deletions
diff --git a/server/FirewallControllerTest.cpp b/server/FirewallControllerTest.cpp
index f4a857c9..0b784055 100644
--- a/server/FirewallControllerTest.cpp
+++ b/server/FirewallControllerTest.cpp
@@ -51,54 +51,6 @@ protected:
}
};
-TEST_F(FirewallControllerTest, TestSetStandbyRule) {
- ExpectedIptablesCommands expected = {
- { V4V6, "*filter\n-D fw_standby -m owner --uid-owner 12345 -j DROP\nCOMMIT\n" }
- };
- mFw.setUidRule(STANDBY, 12345, ALLOW);
- expectIptablesRestoreCommands(expected);
-
- expected = {
- { V4V6, "*filter\n-A fw_standby -m owner --uid-owner 12345 -j DROP\nCOMMIT\n" }
- };
- mFw.setUidRule(STANDBY, 12345, DENY);
- expectIptablesRestoreCommands(expected);
-}
-
-TEST_F(FirewallControllerTest, TestSetDozeRule) {
- ExpectedIptablesCommands expected = {
- { V4V6, "*filter\n-I fw_dozable -m owner --uid-owner 54321 -j RETURN\nCOMMIT\n" }
- };
- mFw.setUidRule(DOZABLE, 54321, ALLOW);
- expectIptablesRestoreCommands(expected);
-
- expected = {
- { V4V6, "*filter\n-D fw_dozable -m owner --uid-owner 54321 -j RETURN\nCOMMIT\n" }
- };
- mFw.setUidRule(DOZABLE, 54321, DENY);
- expectIptablesRestoreCommands(expected);
-}
-
-TEST_F(FirewallControllerTest, TestSetFirewallRule) {
- ExpectedIptablesCommands expected = {
- { V4V6, "*filter\n"
- "-A fw_INPUT -m owner --uid-owner 54321 -j DROP\n"
- "-A fw_OUTPUT -m owner --uid-owner 54321 -j DROP\n"
- "COMMIT\n" }
- };
- mFw.setUidRule(NONE, 54321, DENY);
- expectIptablesRestoreCommands(expected);
-
- expected = {
- { V4V6, "*filter\n"
- "-D fw_INPUT -m owner --uid-owner 54321 -j DROP\n"
- "-D fw_OUTPUT -m owner --uid-owner 54321 -j DROP\n"
- "COMMIT\n" }
- };
- mFw.setUidRule(NONE, 54321, ALLOW);
- expectIptablesRestoreCommands(expected);
-}
-
TEST_F(FirewallControllerTest, TestReplaceAllowlistUidRule) {
std::string expected =
"*filter\n"