From 24287b0b149448fe859f702dbbde5bc195c28af7 Mon Sep 17 00:00:00 2001 From: Eric Anderson Date: Thu, 8 Sep 2022 16:16:11 -0700 Subject: [PATCH] binder: Fix expected result of security test The test name includes "fails" but it asserts the result is OK. The test was added in #9428. The binder tests are passing on the Android CI, but for some reason the tests with sdk >= 29 are skipped. Robolectric 4.8 claims API level 32 support and the tests are skipped even when using Java 11 and 17. --- binder/src/test/java/io/grpc/binder/SecurityPoliciesTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binder/src/test/java/io/grpc/binder/SecurityPoliciesTest.java b/binder/src/test/java/io/grpc/binder/SecurityPoliciesTest.java index 909547a902b..6a692090549 100644 --- a/binder/src/test/java/io/grpc/binder/SecurityPoliciesTest.java +++ b/binder/src/test/java/io/grpc/binder/SecurityPoliciesTest.java @@ -460,7 +460,7 @@ public void testIsProfileOwnerOnOrgOwned_failsForProfileOwnerOnNonOrgOwned() thr policy = SecurityPolicies.isProfileOwnerOnOrganizationOwnedDevice(appContext); - assertThat(policy.checkAuthorization(OTHER_UID).getCode()).isEqualTo(Status.OK.getCode()); + assertThat(policy.checkAuthorization(OTHER_UID).getCode()).isEqualTo(Status.PERMISSION_DENIED.getCode()); } @Test