Merge "Add test for [stop|start]VpnProfile()" into sc-dev am: 2900ffbb5f am: 849c3fb997
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15359731 Change-Id: I8a0f348953405ee38358739525fa9825cd3e0670
This commit is contained in:
@@ -9546,6 +9546,19 @@ public class ConnectivityServiceTest {
|
||||
assertContainsExactly(uidCaptor.getValue(), APP1_UID, APP2_UID);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testStartVpnProfileFromDiffPackage() throws Exception {
|
||||
final String notMyVpnPkg = "com.not.my.vpn";
|
||||
assertThrows(
|
||||
SecurityException.class, () -> mVpnManagerService.startVpnProfile(notMyVpnPkg));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testStopVpnProfileFromDiffPackage() throws Exception {
|
||||
final String notMyVpnPkg = "com.not.my.vpn";
|
||||
assertThrows(SecurityException.class, () -> mVpnManagerService.stopVpnProfile(notMyVpnPkg));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUidUpdateChangesInterfaceFilteringRule() throws Exception {
|
||||
LinkProperties lp = new LinkProperties();
|
||||
|
||||
Reference in New Issue
Block a user