Add a placeholder test to test IcmpPacketReader and sendPing
This will soon become an actual APF test.
Test: atest ApfIntegrationTest
Change-Id: I5c78b557177c96e3460a1057527f67de78290338
diff --git a/tests/cts/net/src/android/net/cts/ApfIntegrationTest.kt b/tests/cts/net/src/android/net/cts/ApfIntegrationTest.kt
index 8b66ed0..9cda156 100644
--- a/tests/cts/net/src/android/net/cts/ApfIntegrationTest.kt
+++ b/tests/cts/net/src/android/net/cts/ApfIntegrationTest.kt
@@ -336,4 +336,14 @@
assertWithMessage("read/write $i byte prog failed").that(readResult).isEqualTo(program)
}
}
+
+ // TODO: this is a placeholder test to test the IcmpPacketReader functionality and will soon be
+ // replaced by a real test.
+ @Test
+ fun testPing() {
+ val data = ByteArray(56)
+ Random.nextBytes(data)
+ packetReader.sendPing(data)
+ assertThat(packetReader.expectPingReply()).isEqualTo(data)
+ }
}