use of com.cloud.agent.api.OvsVpcRoutingPolicyConfigCommand.Acl in project cloudstack by apache.
the class LibvirtComputingResourceTest method testOvsVpcRoutingPolicyConfigCommandFailure.
@SuppressWarnings("unchecked")
@Test(expected = Exception.class)
public void testOvsVpcRoutingPolicyConfigCommandFailure() {
final String id = null;
final String cidr = null;
final Acl[] acls = null;
final com.cloud.agent.api.OvsVpcRoutingPolicyConfigCommand.Tier[] tiers = null;
final OvsVpcRoutingPolicyConfigCommand command = new OvsVpcRoutingPolicyConfigCommand(id, cidr, acls, tiers);
when(libvirtComputingResource.getOvsTunnelPath()).thenThrow(Exception.class);
final LibvirtRequestWrapper wrapper = LibvirtRequestWrapper.getInstance();
assertNotNull(wrapper);
final Answer answer = wrapper.execute(command, libvirtComputingResource);
assertFalse(answer.getResult());
verify(libvirtComputingResource, times(1)).getOvsTunnelPath();
}
use of com.cloud.agent.api.OvsVpcRoutingPolicyConfigCommand.Acl in project cloudstack by apache.
the class LibvirtComputingResourceTest method testOvsVpcRoutingPolicyConfigCommand.
@Test
public void testOvsVpcRoutingPolicyConfigCommand() {
final String id = null;
final String cidr = null;
final Acl[] acls = null;
final com.cloud.agent.api.OvsVpcRoutingPolicyConfigCommand.Tier[] tiers = null;
final OvsVpcRoutingPolicyConfigCommand command = new OvsVpcRoutingPolicyConfigCommand(id, cidr, acls, tiers);
when(libvirtComputingResource.getOvsTunnelPath()).thenReturn("/path");
when(libvirtComputingResource.getTimeout()).thenReturn(Duration.ZERO);
final LibvirtRequestWrapper wrapper = LibvirtRequestWrapper.getInstance();
assertNotNull(wrapper);
final Answer answer = wrapper.execute(command, libvirtComputingResource);
assertFalse(answer.getResult());
verify(libvirtComputingResource, times(1)).getOvsTunnelPath();
verify(libvirtComputingResource, times(1)).getTimeout();
}
Aggregations