mirror of https://github.com/apache/cloudstack.git
remove unused import and fix tests
This commit is contained in:
parent
b419a77fd8
commit
e72afc0895
|
|
@ -28,7 +28,6 @@ import org.apache.cloudstack.api.Parameter;
|
|||
import org.apache.cloudstack.api.ServerApiException;
|
||||
import org.apache.cloudstack.api.response.SuccessResponse;
|
||||
import org.apache.cloudstack.api.response.BackupResponse;
|
||||
import org.apache.cloudstack.backup.Backup;
|
||||
import org.apache.cloudstack.backup.BackupManager;
|
||||
import org.apache.cloudstack.context.CallContext;
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public class CreateIpv4SubnetForGuestNetworkCmdTest {
|
|||
Assert.assertEquals(cidrSize, cmd.getCidrSize());
|
||||
Assert.assertEquals(1L, cmd.getEntityOwnerId());
|
||||
Assert.assertEquals(EventTypes.EVENT_IP4_GUEST_SUBNET_CREATE, cmd.getEventType());
|
||||
Assert.assertEquals(String.format("Creating guest IPv4 subnet %s in zone subnet=%s", subnet, parentUuid), cmd.getEventDescription());
|
||||
Assert.assertEquals(String.format("Creating guest IPv4 subnet %s in zone subnet: %s", subnet, parentUuid), cmd.getEventDescription());
|
||||
|
||||
Ipv4GuestSubnetNetworkMap ipv4GuestSubnetNetworkMap = Mockito.mock(Ipv4GuestSubnetNetworkMap.class);
|
||||
Mockito.when(routedIpv4Manager.createIpv4SubnetForGuestNetwork(cmd)).thenReturn(ipv4GuestSubnetNetworkMap);
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ public class ChangeBgpPeersForNetworkCmdTest {
|
|||
Assert.assertEquals(bgpPeerIds, cmd.getBgpPeerIds());
|
||||
Assert.assertEquals(1L, cmd.getEntityOwnerId());
|
||||
Assert.assertEquals(EventTypes.EVENT_NETWORK_BGP_PEER_UPDATE, cmd.getEventType());
|
||||
Assert.assertEquals(String.format("Changing BGP Peers for network with ID: %s", networkUuid), cmd.getEventDescription());
|
||||
Assert.assertEquals(String.format("Changing BGP Peers for Network with ID: %s", networkUuid), cmd.getEventDescription());
|
||||
|
||||
Network network = Mockito.mock(Network.class);
|
||||
Mockito.when(routedIpv4Manager.changeBgpPeersForNetwork(cmd)).thenReturn(network);
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ public class UpdateAutoScaleVmProfileCmdTest {
|
|||
|
||||
Assert.assertEquals("updateautoscalevmprofileresponse", updateAutoScaleVmProfileCmd.getCommandName());
|
||||
Assert.assertEquals(EventTypes.EVENT_AUTOSCALEVMPROFILE_UPDATE, updateAutoScaleVmProfileCmd.getEventType());
|
||||
Assert.assertEquals("Updating AutoScale Instance Profile. Instance Profile Id: " + profileId, updateAutoScaleVmProfileCmd.getEventDescription());
|
||||
Assert.assertEquals("Updating AutoScale Instance Profile with ID: " + profileId, updateAutoScaleVmProfileCmd.getEventDescription());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ public class UpdateConditionCmdTest {
|
|||
Assert.assertEquals(ApiCommandResourceType.Condition, updateConditionCmd.getApiResourceType());
|
||||
Assert.assertEquals("updateconditionresponse", updateConditionCmd.getCommandName());
|
||||
Assert.assertEquals(EventTypes.EVENT_CONDITION_UPDATE, updateConditionCmd.getEventType());
|
||||
Assert.assertEquals("Updating VM auto scaling condition with ID: " + conditionUuid, updateConditionCmd.getEventDescription());
|
||||
Assert.assertEquals("Updating Instance AutoScale condition with ID: " + conditionUuid, updateConditionCmd.getEventDescription());
|
||||
|
||||
when(entityMgr.findById(Condition.class, conditionId)).thenReturn(condition);
|
||||
when(condition.getAccountId()).thenReturn(accountId);
|
||||
|
|
|
|||
Loading…
Reference in New Issue