remove unused import and fix tests

This commit is contained in:
erikbocks 2026-01-22 11:25:33 -03:00
parent b419a77fd8
commit e72afc0895
5 changed files with 4 additions and 5 deletions

View File

@ -28,7 +28,6 @@ import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.SuccessResponse; import org.apache.cloudstack.api.response.SuccessResponse;
import org.apache.cloudstack.api.response.BackupResponse; import org.apache.cloudstack.api.response.BackupResponse;
import org.apache.cloudstack.backup.Backup;
import org.apache.cloudstack.backup.BackupManager; import org.apache.cloudstack.backup.BackupManager;
import org.apache.cloudstack.context.CallContext; import org.apache.cloudstack.context.CallContext;

View File

@ -57,7 +57,7 @@ public class CreateIpv4SubnetForGuestNetworkCmdTest {
Assert.assertEquals(cidrSize, cmd.getCidrSize()); Assert.assertEquals(cidrSize, cmd.getCidrSize());
Assert.assertEquals(1L, cmd.getEntityOwnerId()); Assert.assertEquals(1L, cmd.getEntityOwnerId());
Assert.assertEquals(EventTypes.EVENT_IP4_GUEST_SUBNET_CREATE, cmd.getEventType()); 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); Ipv4GuestSubnetNetworkMap ipv4GuestSubnetNetworkMap = Mockito.mock(Ipv4GuestSubnetNetworkMap.class);
Mockito.when(routedIpv4Manager.createIpv4SubnetForGuestNetwork(cmd)).thenReturn(ipv4GuestSubnetNetworkMap); Mockito.when(routedIpv4Manager.createIpv4SubnetForGuestNetwork(cmd)).thenReturn(ipv4GuestSubnetNetworkMap);

View File

@ -61,7 +61,7 @@ public class ChangeBgpPeersForNetworkCmdTest {
Assert.assertEquals(bgpPeerIds, cmd.getBgpPeerIds()); Assert.assertEquals(bgpPeerIds, cmd.getBgpPeerIds());
Assert.assertEquals(1L, cmd.getEntityOwnerId()); Assert.assertEquals(1L, cmd.getEntityOwnerId());
Assert.assertEquals(EventTypes.EVENT_NETWORK_BGP_PEER_UPDATE, cmd.getEventType()); 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); Network network = Mockito.mock(Network.class);
Mockito.when(routedIpv4Manager.changeBgpPeersForNetwork(cmd)).thenReturn(network); Mockito.when(routedIpv4Manager.changeBgpPeersForNetwork(cmd)).thenReturn(network);

View File

@ -100,7 +100,7 @@ public class UpdateAutoScaleVmProfileCmdTest {
Assert.assertEquals("updateautoscalevmprofileresponse", updateAutoScaleVmProfileCmd.getCommandName()); Assert.assertEquals("updateautoscalevmprofileresponse", updateAutoScaleVmProfileCmd.getCommandName());
Assert.assertEquals(EventTypes.EVENT_AUTOSCALEVMPROFILE_UPDATE, updateAutoScaleVmProfileCmd.getEventType()); 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 @Test

View File

@ -89,7 +89,7 @@ public class UpdateConditionCmdTest {
Assert.assertEquals(ApiCommandResourceType.Condition, updateConditionCmd.getApiResourceType()); Assert.assertEquals(ApiCommandResourceType.Condition, updateConditionCmd.getApiResourceType());
Assert.assertEquals("updateconditionresponse", updateConditionCmd.getCommandName()); Assert.assertEquals("updateconditionresponse", updateConditionCmd.getCommandName());
Assert.assertEquals(EventTypes.EVENT_CONDITION_UPDATE, updateConditionCmd.getEventType()); 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(entityMgr.findById(Condition.class, conditionId)).thenReturn(condition);
when(condition.getAccountId()).thenReturn(accountId); when(condition.getAccountId()).thenReturn(accountId);