[Thread] pre-grant all permissions for ThreadNetworkControllerServiceTest
Existing ThreadNetworkControllerService tests are using RunAsShell to grant the permissions for indivitual APIs. Given the permission checks are tested in the CTS tests, this is not very useful with the overhead of complicating the testing code. Instead, this CL grants all the permissions in setUp() with spy-ed Context. This commit also fixes the issue in b/326793058 that the tests doesn't run on a U device where the THREAD_NETWORK_PRIVILEGED permission doesn't exist. Bug: 326793058 Test: m ThreadNetworkUnitTests Change-Id: I477cf30d737969ccf12180eae48d3b8fd6ed4a51
Loading
Please register or sign in to comment