commit | 835d2c2d6f151059c4d70adbfdac9aca7b3f98c5 | [log] [tgz] |
---|---|---|
author | Jorge Lucangeli Obes <[email protected]> | Mon Feb 01 15:05:01 2016 -0800 |
committer | Jorge Lucangeli Obes <[email protected]> | Tue Feb 02 08:40:01 2016 -0800 |
tree | abf1bd1bfe6e26da5a7b812c905104aae4c4345a | |
parent | 2b2e047243cc1db7c5f0c744822db0fdbb7a95e0 [diff] |
Refactor IpTables class to remove duplication. This CL tries to remove as much duplicated code from the IpTables class as possible. The basic construct of running the same command with different executables/options is extracted into a helper function. Moreover, the unit tests are simplified by mocking one function call higher and removing a lot of set-up duplication. Bug: 26911013 Change-Id: Iecdacab2ef6ffa5631c877835bdfb0bf7191536c