Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8e190168 authored by Himanshu Arora's avatar Himanshu Arora
Browse files

[HSUM] Skip Test for Non-System Users

Skip the testInflateMessage_updateToCrossProfileNoPermission test if the current user is not a system user

Bug: 383281428
Bug: 383496916
Test: atest DocumentsUIUnitTests:com.android.documentsui.dirlist.MessageTest#testInflateMessage_updateToCrossProfileNoPermission
Flag: EXEMPT, test fix
Change-Id: I39a445e54afb271cf60abfc6f1d222aae8944dfc
parent 50ae92d9
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import static com.android.documentsui.DevicePolicyResources.Strings.WORK_PROFILE
import static com.android.documentsui.DevicePolicyResources.Strings.WORK_PROFILE_OFF_ERROR_TITLE;

import static com.google.common.truth.Truth.assertThat;
import static com.google.common.truth.TruthJUnit.assume;

import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
@@ -139,6 +140,7 @@ public final class MessageTest {
    @Test
    public void testInflateMessage_updateToCrossProfileNoPermission() {
        // Make sure this test is running on system user.
        assume().that(UserId.CURRENT_USER.isSystem()).isTrue();
        Preconditions.checkArgument(UserId.CURRENT_USER.isSystem());
        Model.Update error = new Model.Update(
                new CrossProfileNoPermissionException(),