Add a test for StrictController.
Bug: 21725996
Bug: 25691379
Change-Id: I24b838161eaf98dede2ae897157ba42414fc926f
diff --git a/server/IptablesBaseTest.h b/server/IptablesBaseTest.h
index 11330c2..5516788 100644
--- a/server/IptablesBaseTest.h
+++ b/server/IptablesBaseTest.h
@@ -22,13 +22,18 @@
public:
IptablesBaseTest();
+ typedef std::vector<std::pair<IptablesTarget, std::string>> ExpectedIptablesCommands;
+
static int fake_android_fork_exec(int argc, char* argv[], int *status, bool, bool);
+ static int fakeExecIptables(IptablesTarget target, ...);
static int fakeExecIptablesRestore(IptablesTarget target, const std::string& commands);
void expectIptablesCommands(const std::vector<std::string>& expectedCmds);
+ void expectIptablesCommands(const ExpectedIptablesCommands& expectedCmds);
void expectIptablesRestoreCommands(const std::vector<std::string>& expectedCmds);
protected:
static std::vector<std::string> sCmds;
static std::vector<std::string> sRestoreCmds;
+ int expectIptablesCommand(IptablesTarget target, int pos, const std::string& cmd);
};