Skip to content
Snippets Groups Projects
Commit f848c6c6 authored by Patrick Rohr's avatar Patrick Rohr
Browse files

ethernet: test adding listener after removing server mode iface

Tests that registering a EthernetStateListener functions as expected
after requesting a tethering interface and subsequently removing that
interface.

Test: atest testCallbacks_afterRemovingServerModeInterface
Bug: 290971780
Change-Id: I7b6e1a3b3ac23f4fbdd2d20f63f83d59c4d4999d
parent 88a88f13
No related branches found
No related tags found
No related merge requests found
......@@ -667,6 +667,20 @@ class EthernetManagerTest {
listener.expectCallback(iface, STATE_LINK_UP, ROLE_CLIENT)
}
@Test
fun testCallbacks_afterRemovingServerModeInterface() {
// do not run this test if an interface that can be used for tethering already exists.
assumeNoInterfaceForTetheringAvailable()
val iface = createInterface()
requestTetheredInterface().expectOnAvailable()
removeInterface(iface)
val listener = EthernetStateListener()
addInterfaceStateListener(listener)
listener.assertNoCallback()
}
@Test
fun testGetInterfaceList() {
// Create two test interfaces and check the return list contains the interface names.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment