From c20f3b53b3e605896865cefb808609258ad5b049 Mon Sep 17 00:00:00 2001 From: quidame Date: Mon, 15 Feb 2021 12:23:26 +0100 Subject: [PATCH] fix: swapoff -a before starting tests with a:wqa real swap file --- tests/integration/targets/mount/tasks/swapfile_freebsd.yml | 5 +++++ tests/integration/targets/mount/tasks/swapfile_linux.yml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/tests/integration/targets/mount/tasks/swapfile_freebsd.yml b/tests/integration/targets/mount/tasks/swapfile_freebsd.yml index fb9f967d1cc..cf486049277 100644 --- a/tests/integration/targets/mount/tasks/swapfile_freebsd.yml +++ b/tests/integration/targets/mount/tasks/swapfile_freebsd.yml @@ -2,6 +2,11 @@ # Tasks to validate swapfile management (enabling/disabling its use) on FreeBSD. # The swapfile MUST be associated to a memory disk, that becomes the 'src'. +- name: Swap off all (cleanup previous erraneous tests) + command: + cmd: swapoff -a + + - name: Try to activate swapfile vars: swapfile: /var/swapfile0 diff --git a/tests/integration/targets/mount/tasks/swapfile_linux.yml b/tests/integration/targets/mount/tasks/swapfile_linux.yml index 0d959316f0b..dec24bd6979 100644 --- a/tests/integration/targets/mount/tasks/swapfile_linux.yml +++ b/tests/integration/targets/mount/tasks/swapfile_linux.yml @@ -2,6 +2,11 @@ # Tasks to validate swapfile management (enabling/disabling its use) on Linux. # The swapfile COULD be associated to a loop device, that would become the 'src'. +- name: Swap off all (cleanup previous erraneous tests) + command: + cmd: swapoff -a + + - name: Try to activate swapfile vars: swapfile: /var/swapfile0