Updated Branches: refs/heads/qemu-img ff62902df -> e1cb7927c
Fix test, it should fail, but also clean up Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/e1cb7927 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/e1cb7927 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/e1cb7927 Branch: refs/heads/qemu-img Commit: e1cb7927ca0f02aa57de0aef32d1d091964a4240 Parents: ff62902 Author: Wido den Hollander <[email protected]> Authored: Tue Feb 26 15:41:18 2013 +0100 Committer: Wido den Hollander <[email protected]> Committed: Tue Feb 26 15:41:18 2013 +0100 ---------------------------------------------------------------------- .../apache/cloudstack/utils/qemu/QemuImgTest.java | 19 ++++---------- 1 files changed, 6 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e1cb7927/utils/test/org/apache/cloudstack/utils/qemu/QemuImgTest.java ---------------------------------------------------------------------- diff --git a/utils/test/org/apache/cloudstack/utils/qemu/QemuImgTest.java b/utils/test/org/apache/cloudstack/utils/qemu/QemuImgTest.java index cd513bf..22755eb 100644 --- a/utils/test/org/apache/cloudstack/utils/qemu/QemuImgTest.java +++ b/utils/test/org/apache/cloudstack/utils/qemu/QemuImgTest.java @@ -181,20 +181,13 @@ public class QemuImgTest { QemuImgFile file = new QemuImgFile(filename, startSize, PhysicalDiskFormat.QCOW2); QemuImg qemu = new QemuImg(); - qemu.create(file); - qemu.resize(file, endSize); - Map<String, String> info = qemu.info(file); - - if (info == null) { - fail("We didn't get any information back from qemu-img"); + try { + qemu.create(file); + qemu.resize(file, endSize); + } finally { + File f = new File(filename); + f.delete(); } - - Long infoSize = Long.parseLong(info.get(new String("virtual_size"))); - assertEquals(Long.valueOf(endSize), Long.valueOf(infoSize)); - - File f = new File(filename); - f.delete(); - } @Test(expected = QemuImgException.class)
