Revert "Temporarily ignore ethernet tests until prebuilts are updated"
This reverts commit 14f45a3e98.
Reason for revert: Reenabling tests after prebuilts are updated.
Bug: 233824546
Change-Id: I6883ea55dd390e7fe102b735e0b757e838d9eff6
Merged-In: I8e806b3b884f2e0b6c1a1d2fffdb9a99c5dd60e8
This commit is contained in:
@@ -65,7 +65,6 @@ import com.android.testutils.waitForIdle
|
|||||||
import org.junit.After
|
import org.junit.After
|
||||||
import org.junit.Assume.assumeFalse
|
import org.junit.Assume.assumeFalse
|
||||||
import org.junit.Before
|
import org.junit.Before
|
||||||
import org.junit.Ignore
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.junit.runner.RunWith
|
import org.junit.runner.RunWith
|
||||||
import java.net.Inet6Address
|
import java.net.Inet6Address
|
||||||
@@ -321,7 +320,6 @@ class EthernetManagerTest {
|
|||||||
private fun TestableNetworkCallback.assertNotLost(n: Network? = null) =
|
private fun TestableNetworkCallback.assertNotLost(n: Network? = null) =
|
||||||
assertNoCallbackThat() { it is Lost && (n?.equals(it.network) ?: true) }
|
assertNoCallbackThat() { it is Lost && (n?.equals(it.network) ?: true) }
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
fun testCallbacks() {
|
fun testCallbacks() {
|
||||||
// If an interface exists when the callback is registered, it is reported on registration.
|
// If an interface exists when the callback is registered, it is reported on registration.
|
||||||
@@ -411,7 +409,6 @@ class EthernetManagerTest {
|
|||||||
listener.assertNoCallback()
|
listener.assertNoCallback()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
fun testGetInterfaceList() {
|
fun testGetInterfaceList() {
|
||||||
setIncludeTestInterfaces(true)
|
setIncludeTestInterfaces(true)
|
||||||
@@ -434,7 +431,6 @@ class EthernetManagerTest {
|
|||||||
removeInterface(iface2)
|
removeInterface(iface2)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
fun testNetworkRequest_withSingleExistingInterface() {
|
fun testNetworkRequest_withSingleExistingInterface() {
|
||||||
setIncludeTestInterfaces(true)
|
setIncludeTestInterfaces(true)
|
||||||
@@ -453,7 +449,6 @@ class EthernetManagerTest {
|
|||||||
listenerCb.eventuallyExpectLost(network)
|
listenerCb.eventuallyExpectLost(network)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
fun testNetworkRequest_beforeSingleInterfaceIsUp() {
|
fun testNetworkRequest_beforeSingleInterfaceIsUp() {
|
||||||
setIncludeTestInterfaces(true)
|
setIncludeTestInterfaces(true)
|
||||||
@@ -472,7 +467,6 @@ class EthernetManagerTest {
|
|||||||
releaseNetwork(cb)
|
releaseNetwork(cb)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
fun testNetworkRequest_withMultipleInterfaces() {
|
fun testNetworkRequest_withMultipleInterfaces() {
|
||||||
setIncludeTestInterfaces(true)
|
setIncludeTestInterfaces(true)
|
||||||
@@ -495,7 +489,6 @@ class EthernetManagerTest {
|
|||||||
releaseNetwork(cb)
|
releaseNetwork(cb)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
fun testNetworkRequest_withInterfaceBeingReplaced() {
|
fun testNetworkRequest_withInterfaceBeingReplaced() {
|
||||||
setIncludeTestInterfaces(true)
|
setIncludeTestInterfaces(true)
|
||||||
@@ -516,7 +509,6 @@ class EthernetManagerTest {
|
|||||||
releaseNetwork(cb)
|
releaseNetwork(cb)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
fun testNetworkRequest_withMultipleInterfacesAndRequests() {
|
fun testNetworkRequest_withMultipleInterfacesAndRequests() {
|
||||||
setIncludeTestInterfaces(true)
|
setIncludeTestInterfaces(true)
|
||||||
|
|||||||
@@ -68,7 +68,6 @@ import com.android.testutils.DevSdkIgnoreRule;
|
|||||||
|
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Ignore;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.mockito.ArgumentCaptor;
|
import org.mockito.ArgumentCaptor;
|
||||||
@@ -298,7 +297,6 @@ public class EthernetNetworkFactoryTest {
|
|||||||
clearInvocations(mNetworkAgent);
|
clearInvocations(mNetworkAgent);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testUpdateInterfaceLinkStateForActiveProvisioningInterface() throws Exception {
|
public void testUpdateInterfaceLinkStateForActiveProvisioningInterface() throws Exception {
|
||||||
initEthernetNetworkFactory();
|
initEthernetNetworkFactory();
|
||||||
@@ -314,7 +312,6 @@ public class EthernetNetworkFactoryTest {
|
|||||||
assertEquals(listener.expectOnResult(), TEST_IFACE);
|
assertEquals(listener.expectOnResult(), TEST_IFACE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testUpdateInterfaceLinkStateForProvisionedInterface() throws Exception {
|
public void testUpdateInterfaceLinkStateForProvisionedInterface() throws Exception {
|
||||||
initEthernetNetworkFactory();
|
initEthernetNetworkFactory();
|
||||||
@@ -329,7 +326,6 @@ public class EthernetNetworkFactoryTest {
|
|||||||
assertEquals(listener.expectOnResult(), TEST_IFACE);
|
assertEquals(listener.expectOnResult(), TEST_IFACE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testUpdateInterfaceLinkStateForUnprovisionedInterface() throws Exception {
|
public void testUpdateInterfaceLinkStateForUnprovisionedInterface() throws Exception {
|
||||||
initEthernetNetworkFactory();
|
initEthernetNetworkFactory();
|
||||||
@@ -347,7 +343,6 @@ public class EthernetNetworkFactoryTest {
|
|||||||
assertEquals(listener.expectOnResult(), TEST_IFACE);
|
assertEquals(listener.expectOnResult(), TEST_IFACE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testUpdateInterfaceLinkStateForNonExistingInterface() throws Exception {
|
public void testUpdateInterfaceLinkStateForNonExistingInterface() throws Exception {
|
||||||
initEthernetNetworkFactory();
|
initEthernetNetworkFactory();
|
||||||
@@ -362,7 +357,6 @@ public class EthernetNetworkFactoryTest {
|
|||||||
listener.expectOnError();
|
listener.expectOnError();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testUpdateInterfaceLinkStateWithNoChanges() throws Exception {
|
public void testUpdateInterfaceLinkStateWithNoChanges() throws Exception {
|
||||||
initEthernetNetworkFactory();
|
initEthernetNetworkFactory();
|
||||||
@@ -377,7 +371,6 @@ public class EthernetNetworkFactoryTest {
|
|||||||
listener.expectOnError();
|
listener.expectOnError();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testProvisioningLoss() throws Exception {
|
public void testProvisioningLoss() throws Exception {
|
||||||
initEthernetNetworkFactory();
|
initEthernetNetworkFactory();
|
||||||
@@ -390,7 +383,6 @@ public class EthernetNetworkFactoryTest {
|
|||||||
verify(mIpClient).startProvisioning(any());
|
verify(mIpClient).startProvisioning(any());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testProvisioningLossForDisappearedInterface() throws Exception {
|
public void testProvisioningLossForDisappearedInterface() throws Exception {
|
||||||
initEthernetNetworkFactory();
|
initEthernetNetworkFactory();
|
||||||
@@ -412,7 +404,6 @@ public class EthernetNetworkFactoryTest {
|
|||||||
verify(mIpClient, never()).startProvisioning(any());
|
verify(mIpClient, never()).startProvisioning(any());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testLinkPropertiesChanged() throws Exception {
|
public void testLinkPropertiesChanged() throws Exception {
|
||||||
initEthernetNetworkFactory();
|
initEthernetNetworkFactory();
|
||||||
@@ -424,7 +415,6 @@ public class EthernetNetworkFactoryTest {
|
|||||||
verify(mNetworkAgent).sendLinkPropertiesImpl(same(lp));
|
verify(mNetworkAgent).sendLinkPropertiesImpl(same(lp));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testNetworkUnwanted() throws Exception {
|
public void testNetworkUnwanted() throws Exception {
|
||||||
initEthernetNetworkFactory();
|
initEthernetNetworkFactory();
|
||||||
@@ -435,7 +425,6 @@ public class EthernetNetworkFactoryTest {
|
|||||||
verifyStop();
|
verifyStop();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testNetworkUnwantedWithStaleNetworkAgent() throws Exception {
|
public void testNetworkUnwantedWithStaleNetworkAgent() throws Exception {
|
||||||
initEthernetNetworkFactory();
|
initEthernetNetworkFactory();
|
||||||
@@ -460,7 +449,6 @@ public class EthernetNetworkFactoryTest {
|
|||||||
verify(mNetworkAgent, never()).unregister();
|
verify(mNetworkAgent, never()).unregister();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testTransportOverrideIsCorrectlySet() throws Exception {
|
public void testTransportOverrideIsCorrectlySet() throws Exception {
|
||||||
initEthernetNetworkFactory();
|
initEthernetNetworkFactory();
|
||||||
@@ -482,7 +470,6 @@ public class EthernetNetworkFactoryTest {
|
|||||||
ConnectivityManager.TYPE_NONE);
|
ConnectivityManager.TYPE_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testReachabilityLoss() throws Exception {
|
public void testReachabilityLoss() throws Exception {
|
||||||
initEthernetNetworkFactory();
|
initEthernetNetworkFactory();
|
||||||
@@ -503,7 +490,6 @@ public class EthernetNetworkFactoryTest {
|
|||||||
return staleIpClientCallbacks;
|
return staleIpClientCallbacks;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testIgnoreOnIpLayerStartedCallbackForStaleCallback() throws Exception {
|
public void testIgnoreOnIpLayerStartedCallbackForStaleCallback() throws Exception {
|
||||||
initEthernetNetworkFactory();
|
initEthernetNetworkFactory();
|
||||||
@@ -516,7 +502,6 @@ public class EthernetNetworkFactoryTest {
|
|||||||
verify(mNetworkAgent, never()).register();
|
verify(mNetworkAgent, never()).register();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testIgnoreOnIpLayerStoppedCallbackForStaleCallback() throws Exception {
|
public void testIgnoreOnIpLayerStoppedCallbackForStaleCallback() throws Exception {
|
||||||
initEthernetNetworkFactory();
|
initEthernetNetworkFactory();
|
||||||
@@ -529,7 +514,6 @@ public class EthernetNetworkFactoryTest {
|
|||||||
verify(mIpClient, never()).startProvisioning(any());
|
verify(mIpClient, never()).startProvisioning(any());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testIgnoreLinkPropertiesCallbackForStaleCallback() throws Exception {
|
public void testIgnoreLinkPropertiesCallbackForStaleCallback() throws Exception {
|
||||||
initEthernetNetworkFactory();
|
initEthernetNetworkFactory();
|
||||||
@@ -542,7 +526,6 @@ public class EthernetNetworkFactoryTest {
|
|||||||
verify(mNetworkAgent, never()).sendLinkPropertiesImpl(eq(lp));
|
verify(mNetworkAgent, never()).sendLinkPropertiesImpl(eq(lp));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testIgnoreNeighborLossCallbackForStaleCallback() throws Exception {
|
public void testIgnoreNeighborLossCallbackForStaleCallback() throws Exception {
|
||||||
initEthernetNetworkFactory();
|
initEthernetNetworkFactory();
|
||||||
@@ -611,7 +594,6 @@ public class EthernetNetworkFactoryTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testUpdateInterfaceCallsListenerCorrectlyOnSuccess() throws Exception {
|
public void testUpdateInterfaceCallsListenerCorrectlyOnSuccess() throws Exception {
|
||||||
initEthernetNetworkFactory();
|
initEthernetNetworkFactory();
|
||||||
@@ -627,7 +609,6 @@ public class EthernetNetworkFactoryTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@DevSdkIgnoreRule.IgnoreUpTo(SC_V2) // TODO: Use to Build.VERSION_CODES.SC_V2 when available
|
@DevSdkIgnoreRule.IgnoreUpTo(SC_V2) // TODO: Use to Build.VERSION_CODES.SC_V2 when available
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testUpdateInterfaceAbortsOnConcurrentRemoveInterface() throws Exception {
|
public void testUpdateInterfaceAbortsOnConcurrentRemoveInterface() throws Exception {
|
||||||
initEthernetNetworkFactory();
|
initEthernetNetworkFactory();
|
||||||
@@ -637,7 +618,6 @@ public class EthernetNetworkFactoryTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@DevSdkIgnoreRule.IgnoreUpTo(SC_V2) // TODO: Use to Build.VERSION_CODES.SC_V2 when available
|
@DevSdkIgnoreRule.IgnoreUpTo(SC_V2) // TODO: Use to Build.VERSION_CODES.SC_V2 when available
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testUpdateInterfaceAbortsOnConcurrentUpdateInterfaceLinkState() throws Exception {
|
public void testUpdateInterfaceAbortsOnConcurrentUpdateInterfaceLinkState() throws Exception {
|
||||||
initEthernetNetworkFactory();
|
initEthernetNetworkFactory();
|
||||||
@@ -647,7 +627,6 @@ public class EthernetNetworkFactoryTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@DevSdkIgnoreRule.IgnoreUpTo(SC_V2) // TODO: Use to Build.VERSION_CODES.SC_V2 when available
|
@DevSdkIgnoreRule.IgnoreUpTo(SC_V2) // TODO: Use to Build.VERSION_CODES.SC_V2 when available
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testUpdateInterfaceCallsListenerCorrectlyOnConcurrentRequests() throws Exception {
|
public void testUpdateInterfaceCallsListenerCorrectlyOnConcurrentRequests() throws Exception {
|
||||||
initEthernetNetworkFactory();
|
initEthernetNetworkFactory();
|
||||||
@@ -684,7 +663,6 @@ public class EthernetNetworkFactoryTest {
|
|||||||
failedListener.expectOnError();
|
failedListener.expectOnError();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testUpdateInterfaceRestartsAgentCorrectly() throws Exception {
|
public void testUpdateInterfaceRestartsAgentCorrectly() throws Exception {
|
||||||
initEthernetNetworkFactory();
|
initEthernetNetworkFactory();
|
||||||
@@ -702,7 +680,6 @@ public class EthernetNetworkFactoryTest {
|
|||||||
verifyRestart(ipConfiguration);
|
verifyRestart(ipConfiguration);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testUpdateInterfaceForNonExistingInterface() throws Exception {
|
public void testUpdateInterfaceForNonExistingInterface() throws Exception {
|
||||||
initEthernetNetworkFactory();
|
initEthernetNetworkFactory();
|
||||||
@@ -717,7 +694,6 @@ public class EthernetNetworkFactoryTest {
|
|||||||
listener.expectOnError();
|
listener.expectOnError();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testUpdateInterfaceWithNullIpConfiguration() throws Exception {
|
public void testUpdateInterfaceWithNullIpConfiguration() throws Exception {
|
||||||
initEthernetNetworkFactory();
|
initEthernetNetworkFactory();
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ import androidx.test.filters.SmallTest;
|
|||||||
import androidx.test.runner.AndroidJUnit4;
|
import androidx.test.runner.AndroidJUnit4;
|
||||||
|
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Ignore;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.mockito.Mock;
|
import org.mockito.Mock;
|
||||||
@@ -94,7 +93,6 @@ public class EthernetServiceImplTest {
|
|||||||
doReturn(shouldTrack).when(mEthernetTracker).isTrackingInterface(iface);
|
doReturn(shouldTrack).when(mEthernetTracker).isTrackingInterface(iface);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testSetConfigurationRejectsWhenEthNotStarted() {
|
public void testSetConfigurationRejectsWhenEthNotStarted() {
|
||||||
mEthernetServiceImpl.mStarted.set(false);
|
mEthernetServiceImpl.mStarted.set(false);
|
||||||
@@ -103,7 +101,6 @@ public class EthernetServiceImplTest {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testUpdateConfigurationRejectsWhenEthNotStarted() {
|
public void testUpdateConfigurationRejectsWhenEthNotStarted() {
|
||||||
mEthernetServiceImpl.mStarted.set(false);
|
mEthernetServiceImpl.mStarted.set(false);
|
||||||
@@ -113,7 +110,6 @@ public class EthernetServiceImplTest {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testConnectNetworkRejectsWhenEthNotStarted() {
|
public void testConnectNetworkRejectsWhenEthNotStarted() {
|
||||||
mEthernetServiceImpl.mStarted.set(false);
|
mEthernetServiceImpl.mStarted.set(false);
|
||||||
@@ -122,7 +118,6 @@ public class EthernetServiceImplTest {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testDisconnectNetworkRejectsWhenEthNotStarted() {
|
public void testDisconnectNetworkRejectsWhenEthNotStarted() {
|
||||||
mEthernetServiceImpl.mStarted.set(false);
|
mEthernetServiceImpl.mStarted.set(false);
|
||||||
@@ -131,7 +126,6 @@ public class EthernetServiceImplTest {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testUpdateConfigurationRejectsNullIface() {
|
public void testUpdateConfigurationRejectsNullIface() {
|
||||||
assertThrows(NullPointerException.class, () -> {
|
assertThrows(NullPointerException.class, () -> {
|
||||||
@@ -139,7 +133,6 @@ public class EthernetServiceImplTest {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testConnectNetworkRejectsNullIface() {
|
public void testConnectNetworkRejectsNullIface() {
|
||||||
assertThrows(NullPointerException.class, () -> {
|
assertThrows(NullPointerException.class, () -> {
|
||||||
@@ -147,7 +140,6 @@ public class EthernetServiceImplTest {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testDisconnectNetworkRejectsNullIface() {
|
public void testDisconnectNetworkRejectsNullIface() {
|
||||||
assertThrows(NullPointerException.class, () -> {
|
assertThrows(NullPointerException.class, () -> {
|
||||||
@@ -155,7 +147,6 @@ public class EthernetServiceImplTest {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testUpdateConfigurationWithCapabilitiesRejectsWithoutAutomotiveFeature() {
|
public void testUpdateConfigurationWithCapabilitiesRejectsWithoutAutomotiveFeature() {
|
||||||
toggleAutomotiveFeature(false);
|
toggleAutomotiveFeature(false);
|
||||||
@@ -164,7 +155,6 @@ public class EthernetServiceImplTest {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testUpdateConfigurationWithCapabilitiesWithAutomotiveFeature() {
|
public void testUpdateConfigurationWithCapabilitiesWithAutomotiveFeature() {
|
||||||
toggleAutomotiveFeature(false);
|
toggleAutomotiveFeature(false);
|
||||||
@@ -175,7 +165,6 @@ public class EthernetServiceImplTest {
|
|||||||
eq(UPDATE_REQUEST_WITHOUT_CAPABILITIES.getNetworkCapabilities()), isNull());
|
eq(UPDATE_REQUEST_WITHOUT_CAPABILITIES.getNetworkCapabilities()), isNull());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testConnectNetworkRejectsWithoutAutomotiveFeature() {
|
public void testConnectNetworkRejectsWithoutAutomotiveFeature() {
|
||||||
toggleAutomotiveFeature(false);
|
toggleAutomotiveFeature(false);
|
||||||
@@ -184,7 +173,6 @@ public class EthernetServiceImplTest {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testDisconnectNetworkRejectsWithoutAutomotiveFeature() {
|
public void testDisconnectNetworkRejectsWithoutAutomotiveFeature() {
|
||||||
toggleAutomotiveFeature(false);
|
toggleAutomotiveFeature(false);
|
||||||
@@ -205,7 +193,6 @@ public class EthernetServiceImplTest {
|
|||||||
eq(Manifest.permission.MANAGE_TEST_NETWORKS), anyString());
|
eq(Manifest.permission.MANAGE_TEST_NETWORKS), anyString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testUpdateConfigurationRejectsWithoutManageEthPermission() {
|
public void testUpdateConfigurationRejectsWithoutManageEthPermission() {
|
||||||
denyManageEthPermission();
|
denyManageEthPermission();
|
||||||
@@ -214,7 +201,6 @@ public class EthernetServiceImplTest {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testConnectNetworkRejectsWithoutManageEthPermission() {
|
public void testConnectNetworkRejectsWithoutManageEthPermission() {
|
||||||
denyManageEthPermission();
|
denyManageEthPermission();
|
||||||
@@ -223,7 +209,6 @@ public class EthernetServiceImplTest {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testDisconnectNetworkRejectsWithoutManageEthPermission() {
|
public void testDisconnectNetworkRejectsWithoutManageEthPermission() {
|
||||||
denyManageEthPermission();
|
denyManageEthPermission();
|
||||||
@@ -236,7 +221,6 @@ public class EthernetServiceImplTest {
|
|||||||
when(mEthernetTracker.isValidTestInterface(eq(TEST_IFACE))).thenReturn(true);
|
when(mEthernetTracker.isValidTestInterface(eq(TEST_IFACE))).thenReturn(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testUpdateConfigurationRejectsTestRequestWithoutTestPermission() {
|
public void testUpdateConfigurationRejectsTestRequestWithoutTestPermission() {
|
||||||
enableTestInterface();
|
enableTestInterface();
|
||||||
@@ -246,7 +230,6 @@ public class EthernetServiceImplTest {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testConnectNetworkRejectsTestRequestWithoutTestPermission() {
|
public void testConnectNetworkRejectsTestRequestWithoutTestPermission() {
|
||||||
enableTestInterface();
|
enableTestInterface();
|
||||||
@@ -256,7 +239,6 @@ public class EthernetServiceImplTest {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testDisconnectNetworkRejectsTestRequestWithoutTestPermission() {
|
public void testDisconnectNetworkRejectsTestRequestWithoutTestPermission() {
|
||||||
enableTestInterface();
|
enableTestInterface();
|
||||||
@@ -266,7 +248,6 @@ public class EthernetServiceImplTest {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testUpdateConfiguration() {
|
public void testUpdateConfiguration() {
|
||||||
mEthernetServiceImpl.updateConfiguration(TEST_IFACE, UPDATE_REQUEST, NULL_LISTENER);
|
mEthernetServiceImpl.updateConfiguration(TEST_IFACE, UPDATE_REQUEST, NULL_LISTENER);
|
||||||
@@ -276,21 +257,18 @@ public class EthernetServiceImplTest {
|
|||||||
eq(UPDATE_REQUEST.getNetworkCapabilities()), eq(NULL_LISTENER));
|
eq(UPDATE_REQUEST.getNetworkCapabilities()), eq(NULL_LISTENER));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testConnectNetwork() {
|
public void testConnectNetwork() {
|
||||||
mEthernetServiceImpl.connectNetwork(TEST_IFACE, NULL_LISTENER);
|
mEthernetServiceImpl.connectNetwork(TEST_IFACE, NULL_LISTENER);
|
||||||
verify(mEthernetTracker).connectNetwork(eq(TEST_IFACE), eq(NULL_LISTENER));
|
verify(mEthernetTracker).connectNetwork(eq(TEST_IFACE), eq(NULL_LISTENER));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testDisconnectNetwork() {
|
public void testDisconnectNetwork() {
|
||||||
mEthernetServiceImpl.disconnectNetwork(TEST_IFACE, NULL_LISTENER);
|
mEthernetServiceImpl.disconnectNetwork(TEST_IFACE, NULL_LISTENER);
|
||||||
verify(mEthernetTracker).disconnectNetwork(eq(TEST_IFACE), eq(NULL_LISTENER));
|
verify(mEthernetTracker).disconnectNetwork(eq(TEST_IFACE), eq(NULL_LISTENER));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testUpdateConfigurationAcceptsTestRequestWithNullCapabilities() {
|
public void testUpdateConfigurationAcceptsTestRequestWithNullCapabilities() {
|
||||||
enableTestInterface();
|
enableTestInterface();
|
||||||
@@ -304,7 +282,6 @@ public class EthernetServiceImplTest {
|
|||||||
eq(request.getNetworkCapabilities()), isNull());
|
eq(request.getNetworkCapabilities()), isNull());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testUpdateConfigurationAcceptsRequestWithNullIpConfiguration() {
|
public void testUpdateConfigurationAcceptsRequestWithNullIpConfiguration() {
|
||||||
mEthernetServiceImpl.updateConfiguration(TEST_IFACE, UPDATE_REQUEST_WITHOUT_IP_CONFIG,
|
mEthernetServiceImpl.updateConfiguration(TEST_IFACE, UPDATE_REQUEST_WITHOUT_IP_CONFIG,
|
||||||
@@ -314,7 +291,6 @@ public class EthernetServiceImplTest {
|
|||||||
eq(UPDATE_REQUEST_WITHOUT_IP_CONFIG.getNetworkCapabilities()), isNull());
|
eq(UPDATE_REQUEST_WITHOUT_IP_CONFIG.getNetworkCapabilities()), isNull());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testUpdateConfigurationRejectsInvalidTestRequest() {
|
public void testUpdateConfigurationRejectsInvalidTestRequest() {
|
||||||
enableTestInterface();
|
enableTestInterface();
|
||||||
@@ -333,7 +309,6 @@ public class EthernetServiceImplTest {
|
|||||||
.setNetworkCapabilities(nc).build();
|
.setNetworkCapabilities(nc).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testUpdateConfigurationForTestRequestDoesNotRequireAutoOrEthernetPermission() {
|
public void testUpdateConfigurationForTestRequestDoesNotRequireAutoOrEthernetPermission() {
|
||||||
enableTestInterface();
|
enableTestInterface();
|
||||||
@@ -348,7 +323,6 @@ public class EthernetServiceImplTest {
|
|||||||
eq(request.getNetworkCapabilities()), eq(NULL_LISTENER));
|
eq(request.getNetworkCapabilities()), eq(NULL_LISTENER));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testConnectNetworkForTestRequestDoesNotRequireAutoOrNetPermission() {
|
public void testConnectNetworkForTestRequestDoesNotRequireAutoOrNetPermission() {
|
||||||
enableTestInterface();
|
enableTestInterface();
|
||||||
@@ -359,7 +333,6 @@ public class EthernetServiceImplTest {
|
|||||||
verify(mEthernetTracker).connectNetwork(eq(TEST_IFACE), eq(NULL_LISTENER));
|
verify(mEthernetTracker).connectNetwork(eq(TEST_IFACE), eq(NULL_LISTENER));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testDisconnectNetworkForTestRequestDoesNotRequireAutoOrNetPermission() {
|
public void testDisconnectNetworkForTestRequestDoesNotRequireAutoOrNetPermission() {
|
||||||
enableTestInterface();
|
enableTestInterface();
|
||||||
@@ -377,7 +350,6 @@ public class EthernetServiceImplTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testSetEthernetEnabled() {
|
public void testSetEthernetEnabled() {
|
||||||
denyPermissions(android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK);
|
denyPermissions(android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK);
|
||||||
|
|||||||
@@ -60,7 +60,6 @@ import com.android.testutils.HandlerUtils;
|
|||||||
|
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Ignore;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.mockito.ArgumentCaptor;
|
import org.mockito.ArgumentCaptor;
|
||||||
@@ -114,7 +113,6 @@ public class EthernetTrackerTest {
|
|||||||
/**
|
/**
|
||||||
* Test: Creation of various valid static IP configurations
|
* Test: Creation of various valid static IP configurations
|
||||||
*/
|
*/
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void createStaticIpConfiguration() {
|
public void createStaticIpConfiguration() {
|
||||||
// Empty gives default StaticIPConfiguration object
|
// Empty gives default StaticIPConfiguration object
|
||||||
@@ -147,7 +145,6 @@ public class EthernetTrackerTest {
|
|||||||
/**
|
/**
|
||||||
* Test: Attempt creation of various bad static IP configurations
|
* Test: Attempt creation of various bad static IP configurations
|
||||||
*/
|
*/
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void createStaticIpConfiguration_Bad() {
|
public void createStaticIpConfiguration_Bad() {
|
||||||
assertStaticConfigurationFails("ip=192.0.2.1/24 gateway= blah=20.20.20.20"); // Unknown key
|
assertStaticConfigurationFails("ip=192.0.2.1/24 gateway= blah=20.20.20.20"); // Unknown key
|
||||||
@@ -191,7 +188,6 @@ public class EthernetTrackerTest {
|
|||||||
/**
|
/**
|
||||||
* Test: Attempt to create a capabilties with various valid sets of capabilities/transports
|
* Test: Attempt to create a capabilties with various valid sets of capabilities/transports
|
||||||
*/
|
*/
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void createNetworkCapabilities() {
|
public void createNetworkCapabilities() {
|
||||||
|
|
||||||
@@ -318,7 +314,6 @@ public class EthernetTrackerTest {
|
|||||||
configTransports).build());
|
configTransports).build());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testCreateEthernetTrackerConfigReturnsCorrectValue() {
|
public void testCreateEthernetTrackerConfigReturnsCorrectValue() {
|
||||||
final String capabilities = "2";
|
final String capabilities = "2";
|
||||||
@@ -335,14 +330,12 @@ public class EthernetTrackerTest {
|
|||||||
assertEquals(transport, config.mTransport);
|
assertEquals(transport, config.mTransport);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testCreateEthernetTrackerConfigThrowsNpeWithNullInput() {
|
public void testCreateEthernetTrackerConfigThrowsNpeWithNullInput() {
|
||||||
assertThrows(NullPointerException.class,
|
assertThrows(NullPointerException.class,
|
||||||
() -> EthernetTracker.createEthernetTrackerConfig(null));
|
() -> EthernetTracker.createEthernetTrackerConfig(null));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testUpdateConfiguration() {
|
public void testUpdateConfiguration() {
|
||||||
final NetworkCapabilities capabilities = new NetworkCapabilities.Builder().build();
|
final NetworkCapabilities capabilities = new NetworkCapabilities.Builder().build();
|
||||||
@@ -360,7 +353,6 @@ public class EthernetTrackerTest {
|
|||||||
eq(TEST_IFACE), eq(ipConfig), eq(capabilities), eq(listener));
|
eq(TEST_IFACE), eq(ipConfig), eq(capabilities), eq(listener));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testConnectNetworkCorrectlyCallsFactory() {
|
public void testConnectNetworkCorrectlyCallsFactory() {
|
||||||
tracker.connectNetwork(TEST_IFACE, NULL_LISTENER);
|
tracker.connectNetwork(TEST_IFACE, NULL_LISTENER);
|
||||||
@@ -370,7 +362,6 @@ public class EthernetTrackerTest {
|
|||||||
eq(NULL_LISTENER));
|
eq(NULL_LISTENER));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testDisconnectNetworkCorrectlyCallsFactory() {
|
public void testDisconnectNetworkCorrectlyCallsFactory() {
|
||||||
tracker.disconnectNetwork(TEST_IFACE, NULL_LISTENER);
|
tracker.disconnectNetwork(TEST_IFACE, NULL_LISTENER);
|
||||||
@@ -380,7 +371,6 @@ public class EthernetTrackerTest {
|
|||||||
eq(NULL_LISTENER));
|
eq(NULL_LISTENER));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testIsValidTestInterfaceIsFalseWhenTestInterfacesAreNotIncluded() {
|
public void testIsValidTestInterfaceIsFalseWhenTestInterfacesAreNotIncluded() {
|
||||||
final String validIfaceName = TEST_TAP_PREFIX + "123";
|
final String validIfaceName = TEST_TAP_PREFIX + "123";
|
||||||
@@ -392,7 +382,6 @@ public class EthernetTrackerTest {
|
|||||||
assertFalse(isValidTestInterface);
|
assertFalse(isValidTestInterface);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testIsValidTestInterfaceIsFalseWhenTestInterfaceNameIsInvalid() {
|
public void testIsValidTestInterfaceIsFalseWhenTestInterfaceNameIsInvalid() {
|
||||||
final String invalidIfaceName = "123" + TEST_TAP_PREFIX;
|
final String invalidIfaceName = "123" + TEST_TAP_PREFIX;
|
||||||
@@ -404,7 +393,6 @@ public class EthernetTrackerTest {
|
|||||||
assertFalse(isValidTestInterface);
|
assertFalse(isValidTestInterface);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testIsValidTestInterfaceIsTrueWhenTestInterfacesIncludedAndValidName() {
|
public void testIsValidTestInterfaceIsTrueWhenTestInterfacesIncludedAndValidName() {
|
||||||
final String validIfaceName = TEST_TAP_PREFIX + "123";
|
final String validIfaceName = TEST_TAP_PREFIX + "123";
|
||||||
@@ -434,7 +422,6 @@ public class EthernetTrackerTest {
|
|||||||
return ifaceParcel;
|
return ifaceParcel;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testListenEthernetStateChange() throws Exception {
|
public void testListenEthernetStateChange() throws Exception {
|
||||||
tracker.setIncludeTestInterfaces(true);
|
tracker.setIncludeTestInterfaces(true);
|
||||||
@@ -487,7 +474,6 @@ public class EthernetTrackerTest {
|
|||||||
anyInt(), any());
|
anyInt(), any());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("TODO: temporarily ignore tests until prebuilts are updated")
|
|
||||||
@Test
|
@Test
|
||||||
public void testListenEthernetStateChange_unsolicitedEventListener() throws Exception {
|
public void testListenEthernetStateChange_unsolicitedEventListener() throws Exception {
|
||||||
when(mNetd.interfaceGetList()).thenReturn(new String[] {});
|
when(mNetd.interfaceGetList()).thenReturn(new String[] {});
|
||||||
|
|||||||
Reference in New Issue
Block a user