use of org.ovirt.engine.core.common.businessentities.gluster.GlusterServer in project ovirt-engine by oVirt.
the class GlusterServerDaoTest method testRemove.
@Test
public void testRemove() {
dao.remove(FixturesTool.GLUSTER_BRICK_SERVER1);
GlusterServer entity = dao.getByServerId(FixturesTool.GLUSTER_BRICK_SERVER1);
assertNull(entity);
}
use of org.ovirt.engine.core.common.businessentities.gluster.GlusterServer in project ovirt-engine by oVirt.
the class GlusterServerDaoTest method testUpdateKnownAddresses.
@Test
public void testUpdateKnownAddresses() {
GlusterServer entityToUpdate = new GlusterServer(FixturesTool.GLUSTER_BRICK_SERVER1, FixturesTool.GLUSTER_SERVER_UUID_NEW);
dao.update(entityToUpdate);
dao.addKnownAddress(FixturesTool.GLUSTER_BRICK_SERVER1, "a.1");
GlusterServer entity = dao.getByServerId(FixturesTool.GLUSTER_BRICK_SERVER1);
assertNotNull(entity);
assertEquals(1, entity.getKnownAddresses().size());
assertEquals("a.1", entity.getKnownAddresses().get(0));
ArrayList<String> knownAddresses = new ArrayList<>();
knownAddresses.add("a.2");
dao.updateKnownAddresses(FixturesTool.GLUSTER_BRICK_SERVER1, knownAddresses);
entity = dao.getByServerId(FixturesTool.GLUSTER_BRICK_SERVER1);
assertNotNull(entity);
assertEquals(1, entity.getKnownAddresses().size());
assertEquals("a.2", entity.getKnownAddresses().get(0));
}
use of org.ovirt.engine.core.common.businessentities.gluster.GlusterServer in project ovirt-engine by oVirt.
the class GlusterServerDaoTest method testAddKnownAddresses.
@Test
public void testAddKnownAddresses() {
GlusterServer entityToUpdate = new GlusterServer(FixturesTool.GLUSTER_BRICK_SERVER1, FixturesTool.GLUSTER_SERVER_UUID_NEW);
dao.update(entityToUpdate);
dao.addKnownAddress(FixturesTool.GLUSTER_BRICK_SERVER1, "a.1");
GlusterServer entity = dao.getByServerId(FixturesTool.GLUSTER_BRICK_SERVER1);
assertNotNull(entity);
assertEquals(1, entity.getKnownAddresses().size());
assertEquals("a.1", entity.getKnownAddresses().get(0));
dao.addKnownAddress(FixturesTool.GLUSTER_BRICK_SERVER1, "a.2");
entity = dao.getByServerId(FixturesTool.GLUSTER_BRICK_SERVER1);
assertNotNull(entity);
assertEquals(2, entity.getKnownAddresses().size());
assertEquals("a.2", entity.getKnownAddresses().get(1));
}
use of org.ovirt.engine.core.common.businessentities.gluster.GlusterServer in project ovirt-engine by oVirt.
the class GetGlusterVolumeRemoveBricksStatusQueryTest method getGlusterServer.
private GlusterServer getGlusterServer() {
GlusterServer glusterServer = new GlusterServer();
glusterServer.setId(SERVER_ID);
glusterServer.setGlusterServerUuid(SERVER_UUID_1);
return glusterServer;
}
use of org.ovirt.engine.core.common.businessentities.gluster.GlusterServer in project ovirt-engine by oVirt.
the class GetGlusterVolumeRebalanceStatusQueryTest method getGlusterServer.
private GlusterServer getGlusterServer() {
GlusterServer glusterServer = new GlusterServer();
glusterServer.setId(SERVER_ID);
glusterServer.setGlusterServerUuid(SERVER_UUID_1);
return glusterServer;
}
Aggregations