Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
platform_packages_modules_Connectivity
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LMODroid
platform_packages_modules_Connectivity
Commits
35c1bc4f
Commit
35c1bc4f
authored
1 year ago
by
Chiachang Wang
Committed by
Gerrit Code Review
1 year ago
Browse files
Options
Downloads
Plain Diff
Merge "Update test as the parameters are removed from production code" into main
parents
e9a5de9f
a34e0456
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/unit/java/com/android/server/ConnectivityServiceTest.java
+3
-4
3 additions, 4 deletions
...unit/java/com/android/server/ConnectivityServiceTest.java
tests/unit/java/com/android/server/connectivity/VpnTest.java
+1
-10
1 addition, 10 deletions
tests/unit/java/com/android/server/connectivity/VpnTest.java
with
4 additions
and
14 deletions
tests/unit/java/com/android/server/ConnectivityServiceTest.java
+
3
−
4
View file @
35c1bc4f
...
...
@@ -1659,8 +1659,7 @@ public class ConnectivityServiceTest {
waitForIdle();
}
public void startLegacyVpnPrivileged(VpnProfile profile,
@Nullable Network underlying, @NonNull LinkProperties egress) {
public void startLegacyVpnPrivileged(VpnProfile profile) {
switch (profile.type) {
case VpnProfile.TYPE_IKEV2_IPSEC_RSA:
case VpnProfile.TYPE_IKEV2_IPSEC_USER_PASS:
...
...
@@ -10252,7 +10251,7 @@ public class ConnectivityServiceTest {
b.expectBroadcast();
// Simulate LockdownVpnTracker attempting to start the VPN since it received the
// systemDefault callback.
mMockVpn.startLegacyVpnPrivileged(profile
, mCellAgent.getNetwork(), cellLp
);
mMockVpn.startLegacyVpnPrivileged(profile);
if (expectSetVpnDefaultForUids) {
// setVpnDefaultForUids() releases the original network request and creates a VPN
// request so LOST callback is received.
...
...
@@ -10323,7 +10322,7 @@ public class ConnectivityServiceTest {
// callback with different network.
final ExpectedBroadcast b6 = expectConnectivityAction(TYPE_VPN, DetailedState.DISCONNECTED);
mMockVpn.stopVpnRunnerPrivileged();
mMockVpn.startLegacyVpnPrivileged(profile
, mWiFiAgent.getNetwork(), wifiLp
);
mMockVpn.startLegacyVpnPrivileged(profile);
// VPN network is disconnected (to restart)
callback.expect(LOST, mMockVpn);
defaultCallback.expect(LOST, mMockVpn);
...
...
This diff is collapsed.
Click to expand it.
tests/unit/java/com/android/server/connectivity/VpnTest.java
+
1
−
10
View file @
35c1bc4f
...
...
@@ -2039,16 +2039,7 @@ public class VpnTest extends VpnTestBase {
private
Vpn
startLegacyVpn
(
final
Vpn
vpn
,
final
VpnProfile
vpnProfile
)
throws
Exception
{
setMockedUsers
(
PRIMARY_USER
);
// Dummy egress interface
final
LinkProperties
lp
=
new
LinkProperties
();
lp
.
setInterfaceName
(
EGRESS_IFACE
);
final
RouteInfo
defaultRoute
=
new
RouteInfo
(
new
IpPrefix
(
Inet4Address
.
ANY
,
0
),
InetAddresses
.
parseNumericAddress
(
"192.0.2.0"
),
EGRESS_IFACE
);
lp
.
addRoute
(
defaultRoute
);
vpn
.
startLegacyVpn
(
vpnProfile
,
EGRESS_NETWORK
,
lp
);
vpn
.
startLegacyVpn
(
vpnProfile
);
return
vpn
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment