@Test public void delete() { String name = host.getName(); res = host.delete(); assertTrue(res.getErrorMessage(), !res.isError()); res = host.info(); assertTrue(res.isError()); res = hostPool.info(); assertTrue(res.getErrorMessage(), !res.isError()); boolean found = false; for (Host h : hostPool) { found = found || h.getName().equals(name); } assertTrue(!found); }
@Test public void allocate() { String name = "allocate_test"; res = Host.allocate(client, name, "im_dummy", "vmm_dummy"); assertTrue(res.getErrorMessage(), !res.isError()); // assertTrue( res.getMessage().equals("0") ); hostPool.info(); boolean found = false; for (Host h : hostPool) { found = found || h.getName().equals(name); } assertTrue(found); }