use of org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity in project ovirt-engine by oVirt.
the class GlusterHooksDaoTest method testRemove.
@Test
public void testRemove() {
dao.remove(FixturesTool.HOOK_ID);
GlusterHookEntity hook = dao.getById(FixturesTool.HOOK_ID);
assertNull(hook);
GlusterServerHook serverhook = dao.getGlusterServerHook(FixturesTool.HOOK_ID, FixturesTool.VDS_GLUSTER_SERVER2);
assertNull(serverhook);
}
use of org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity in project ovirt-engine by oVirt.
the class GlusterHooksDaoTest method updateGlusterHookContent.
@Test
public void updateGlusterHookContent() {
String updateContent = "Updated script content to test";
String updateChecksum = "ddffeef712fc008f857e77a2f3f179c710";
dao.updateGlusterHookContent(FixturesTool.HOOK_ID, updateChecksum, updateContent);
GlusterHookEntity hook = dao.getById(FixturesTool.HOOK_ID, true);
assertNotNull(hook);
assertEquals(updateContent, hook.getContent());
assertEquals(updateChecksum, hook.getChecksum());
}
use of org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity in project ovirt-engine by oVirt.
the class GlusterHooksDaoTest method testSave.
@Test
public void testSave() {
GlusterHookEntity newHook = getGlusterHook();
newHook.setId(FixturesTool.NEW_HOOK_ID);
dao.save(newHook);
GlusterHookEntity hook = dao.getById(newHook.getId());
assertEquals(newHook, hook);
}
use of org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity in project ovirt-engine by oVirt.
the class GlusterHooksDaoTest method testGetHook.
@Test
public void testGetHook() {
GlusterHookEntity hook = dao.getGlusterHook(FixturesTool.GLUSTER_CLUSTER_ID, GLUSTER_COMMAND, GlusterHookStage.POST, EXISTING_HOOK_NAME);
assertNotNull(hook);
assertEquals(EXISTING_HOOK_NAME, hook.getName());
}
use of org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity in project ovirt-engine by oVirt.
the class GlusterHooksDaoTest method testRemoveAllServerHooks.
@Test
public void testRemoveAllServerHooks() {
dao.removeGlusterServerHooks(FixturesTool.HOOK_ID);
GlusterHookEntity hook = dao.getById(FixturesTool.HOOK_ID, true);
assertTrue(hook.getServerHooks().isEmpty());
}
Aggregations