summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Yan Yan <evitayan@google.com> 2025-02-27 11:36:15 -0800
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2025-02-27 11:36:15 -0800
commit0384d3529e81c33135b4d0c7a99149971434b82b (patch)
tree8ee714831abf1a767521d8bcb59b0989ad788a5c
parent91594dd78f1fbc07ea93488e2c55006cabd5b6bc (diff)
parentda03fb361aa6a296e63acc901af49889c12eff2a (diff)
Merge "Skip some VCN unit tests on user builds" into main
-rw-r--r--tests/vcn/java/com/android/server/VcnManagementServiceTest.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/vcn/java/com/android/server/VcnManagementServiceTest.java b/tests/vcn/java/com/android/server/VcnManagementServiceTest.java
index a97f9a837bab..3cccbc419425 100644
--- a/tests/vcn/java/com/android/server/VcnManagementServiceTest.java
+++ b/tests/vcn/java/com/android/server/VcnManagementServiceTest.java
@@ -41,6 +41,7 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
+import static org.junit.Assume.assumeTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.anyInt;
@@ -1088,6 +1089,10 @@ public class VcnManagementServiceTest {
@Test
public void testGetRestrictedTransportsFromCarrierConfig() {
+ assumeTrue(
+ "Configuring restricted transport types is only allowed on a debuggable build",
+ Build.isDebuggable());
+
final Set<Integer> restrictedTransports = new ArraySet<>();
restrictedTransports.add(TRANSPORT_CELLULAR);
restrictedTransports.add(TRANSPORT_WIFI);
@@ -1109,6 +1114,10 @@ public class VcnManagementServiceTest {
@Test
public void testGetRestrictedTransportsFromCarrierConfig_noRestrictPolicyConfigured() {
+ assumeTrue(
+ "Configuring restricted transport types is only allowed on a debuggable build",
+ Build.isDebuggable());
+
final Set<Integer> restrictedTransports = Collections.singleton(TRANSPORT_WIFI);
final PersistableBundleWrapper carrierConfig =
@@ -1123,6 +1132,10 @@ public class VcnManagementServiceTest {
@Test
public void testGetRestrictedTransportsFromCarrierConfig_noCarrierConfig() {
+ assumeTrue(
+ "Configuring restricted transport types is only allowed on a debuggable build",
+ Build.isDebuggable());
+
final Set<Integer> restrictedTransports = Collections.singleton(TRANSPORT_WIFI);
final TelephonySubscriptionSnapshot lastSnapshot =
@@ -1134,6 +1147,10 @@ public class VcnManagementServiceTest {
@Test
public void testGetRestrictedTransportsFromCarrierConfigAndVcnConfig() {
+ assumeTrue(
+ "Configuring restricted transport types is only allowed on a debuggable build",
+ Build.isDebuggable());
+
// Configure restricted transport in CarrierConfig
final Set<Integer> restrictedTransportInCarrierConfig =
Collections.singleton(TRANSPORT_WIFI);