summaryrefslogtreecommitdiff
path: root/server/TetherControllerTest.cpp
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2017-01-31 19:06:59 +0900
committerLorenzo Colitti <lorenzo@google.com>2017-09-05 12:50:31 +0900
commit9a8a9ff53dae3196517928e58cf884449b6588f3 (patch)
treed9b9c1e00a5bb2c2550e8adc5bf102693e4961fa /server/TetherControllerTest.cpp
parenta2d039c860379779bc079bc0e800d7b472e7bb3f (diff)
Add a binder RPC for tethering stats.
Bug: 32163131 Bug: 64995262 Test: netd_{unit,integration}_test pass Change-Id: I9c7dfdaf6b823840b1691761930b53c30a4dcbc3
Diffstat (limited to 'server/TetherControllerTest.cpp')
-rw-r--r--server/TetherControllerTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/TetherControllerTest.cpp b/server/TetherControllerTest.cpp
index b3630937..c13758ce 100644
--- a/server/TetherControllerTest.cpp
+++ b/server/TetherControllerTest.cpp
@@ -291,7 +291,6 @@ TEST_F(TetherControllerTest, TestGetTetherStats) {
clearIptablesRestoreOutput();
// But if interfaces aren't paired, it's always an error.
- err = "";
counterLines.resize(3);
counters = Join(counterLines, "\n") + "\n";
addIptablesRestoreOutput(counters, counters);
@@ -302,7 +301,8 @@ TEST_F(TetherControllerTest, TestGetTetherStats) {
// Token unit test of the fact that we return the stats in the error message which the caller
// ignores.
std::string expectedError = counters;
- EXPECT_EQ(expectedError, err);
+ ASSERT_LE(expectedError.size(), err.size());
+ EXPECT_TRUE(std::equal(expectedError.rbegin(), expectedError.rend(), err.rbegin()));
}
} // namespace net