use of com.sequenceiq.freeipa.client.model.SudoCommand in project cloudbreak by hortonworks.
the class SudoRuleServiceTest method aSudoCommand.
private SudoCommand aSudoCommand(String command) {
SudoCommand sudoCommand = new SudoCommand();
sudoCommand.setSudocmd(command);
return sudoCommand;
}
use of com.sequenceiq.freeipa.client.model.SudoCommand in project cloudbreak by hortonworks.
the class SudoCommandAddOperationTest method testInvoke.
@Test
public void testInvoke() throws FreeIpaClientException {
RPCResponse<Object> rpcResponse = new RPCResponse<>();
rpcResponse.setResult(new SudoCommand());
when(freeIpaClient.invoke(any(), anyList(), any(), any())).thenReturn(rpcResponse);
SudoCommandAddOperation.create(NAME).invoke(freeIpaClient);
verify(freeIpaClient).invoke(eq("sudocmd_add"), argThat(argument -> argument.contains(NAME) && argument.size() == 1), argThat(argument -> argument.isEmpty()), eq(SudoCommand.class));
}
Aggregations