From 1a51b08875f991c1bf8d05d573c9e7d522cc31be Mon Sep 17 00:00:00 2001 From: Claude Dioudonnat Date: Mon, 9 Jul 2018 20:56:43 +0200 Subject: [PATCH] Fix increase fake disk size for filesytem's tests --- .../integration/targets/filesystem/tasks/create_device.yml | 5 +++++ test/integration/targets/filesystem/tasks/create_fs.yml | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/test/integration/targets/filesystem/tasks/create_device.yml b/test/integration/targets/filesystem/tasks/create_device.yml index 722565d48f..052934cc54 100644 --- a/test/integration/targets/filesystem/tasks/create_device.yml +++ b/test/integration/targets/filesystem/tasks/create_device.yml @@ -22,6 +22,11 @@ removes: '{{ dev }}' when: fstype == 'lvm' + - name: 'Clean correct device for LVM' + set_fact: + dev: '{{ image_file }}' + when: fstype == 'lvm' + - file: name: '{{ image_file }}' state: absent diff --git a/test/integration/targets/filesystem/tasks/create_fs.yml b/test/integration/targets/filesystem/tasks/create_fs.yml index 3c49d54857..b42f886ef0 100644 --- a/test/integration/targets/filesystem/tasks/create_fs.yml +++ b/test/integration/targets/filesystem/tasks/create_fs.yml @@ -44,7 +44,12 @@ - 'uuid.stdout != uuid3.stdout' - name: increase fake device - shell: 'dd if=/dev/zero bs=1M count=20 >> {{ image_file }}' + shell: 'dd if=/dev/zero bs=1M count=1 >> {{ image_file }}' + +- when: fstype == 'lvm' + block: + - name: Resize loop device for LVM + command: losetup -c {{ dev }} - when: 'grow|bool and (fstype != "vfat" or resize_vfat)' block: