Search in sources :

Example 1 with VMTemplateStorageResourceAssoc

use of com.cloud.storage.VMTemplateStorageResourceAssoc in project cloudstack by apache.

the class NotAValidCommand method testDestroyCommand.

@Test
public void testDestroyCommand() {
    final VMTemplateStorageResourceAssoc templateStorage = Mockito.mock(VMTemplateStorageResourceAssoc.class);
    final StoragePoolVO poolVO = Mockito.mock(StoragePoolVO.class);
    final DestroyCommand destroyCommand = new DestroyCommand(poolVO, templateStorage);
    final CitrixRequestWrapper wrapper = CitrixRequestWrapper.getInstance();
    assertNotNull(wrapper);
    final Answer answer = wrapper.execute(destroyCommand, citrixResourceBase);
    verify(citrixResourceBase, times(1)).getConnection();
    assertFalse(answer.getResult());
}
Also used : RebootAnswer(com.cloud.agent.api.RebootAnswer) CreateAnswer(com.cloud.agent.api.storage.CreateAnswer) AttachAnswer(org.apache.cloudstack.storage.command.AttachAnswer) Answer(com.cloud.agent.api.Answer) DestroyCommand(com.cloud.agent.api.storage.DestroyCommand) StoragePoolVO(org.apache.cloudstack.storage.datastore.db.StoragePoolVO) VMTemplateStorageResourceAssoc(com.cloud.storage.VMTemplateStorageResourceAssoc) Test(org.junit.Test)

Aggregations

Answer (com.cloud.agent.api.Answer)1 RebootAnswer (com.cloud.agent.api.RebootAnswer)1 CreateAnswer (com.cloud.agent.api.storage.CreateAnswer)1 DestroyCommand (com.cloud.agent.api.storage.DestroyCommand)1 VMTemplateStorageResourceAssoc (com.cloud.storage.VMTemplateStorageResourceAssoc)1 AttachAnswer (org.apache.cloudstack.storage.command.AttachAnswer)1 StoragePoolVO (org.apache.cloudstack.storage.datastore.db.StoragePoolVO)1 Test (org.junit.Test)1