mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Make AclApiServiceTest pass without changing ApiServerService signature.
This commit is contained in:
parent
28b81e423e
commit
e02e19a6f1
@ -36,5 +36,5 @@ public interface ApiServerService {
|
||||
|
||||
public String handleRequest(Map params, String responseType, StringBuffer auditTrailSb) throws ServerApiException;
|
||||
|
||||
public Class getCmdClass(String cmdName);
|
||||
public Class<?> getCmdClass(String cmdName);
|
||||
}
|
||||
|
||||
@ -268,7 +268,8 @@ public class AclApiServiceTest {
|
||||
policies.add(policy);
|
||||
Long policyId = policy.getId();
|
||||
Long resId = 200L;
|
||||
when(_apiServer.getCmdClass("listVirtualMachines")).thenReturn(ListVMsCmd.class);
|
||||
Class clz = ListVMsCmd.class;
|
||||
when(_apiServer.getCmdClass("listVirtualMachines")).thenReturn(clz);
|
||||
when(
|
||||
_iamSrv.addAclPermissionToAclPolicy(policyId, AclEntityType.VirtualMachine.toString(), PermissionScope.RESOURCE.toString(), resId, "listVirtualMachines",
|
||||
AccessType.ListEntry.toString(), Permission.Allow)).thenReturn(policy);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user