From 2d5fb42acdf9e2981cb795254a47d3107b9612e1 Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Thu, 4 Jun 2020 15:54:14 -0500 Subject: [PATCH] Revert "Enable at, patch and synchronize tests (#5)" (#35) This reverts commit 27482c25f9f28753571294c6249f4622de57ba3a. --- tests/integration/targets/at/aliases | 1 + tests/integration/targets/at/tasks/main.yml | 31 +++++++++---------- tests/integration/targets/patch/aliases | 1 + .../integration/targets/patch/tasks/main.yml | 29 +---------------- tests/integration/targets/synchronize/aliases | 1 + .../targets/synchronize/tasks/main.yml | 13 +------- 6 files changed, 19 insertions(+), 57 deletions(-) diff --git a/tests/integration/targets/at/aliases b/tests/integration/targets/at/aliases index 6eae8bd..85f744a 100644 --- a/tests/integration/targets/at/aliases +++ b/tests/integration/targets/at/aliases @@ -1,2 +1,3 @@ shippable/posix/group1 destructive +disabled # fixme package diff --git a/tests/integration/targets/at/tasks/main.yml b/tests/integration/targets/at/tasks/main.yml index 5c01559..cd09e11 100644 --- a/tests/integration/targets/at/tasks/main.yml +++ b/tests/integration/targets/at/tasks/main.yml @@ -16,37 +16,34 @@ # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . -- debug: - msg: >- - Skipping {{ ansible_distribution }} as ansible-base does not contain - the packaging module ({{ ansible_pkg_mgr }}) for this operating system - when: ansible_pkg_mgr not in ['apt', 'dnf', 'yum'] or ansible_distribution in ['AIX'] - -- name: stop executing on hosts that we don't have package manager modules for - meta: end_host - when: ansible_pkg_mgr not in ['apt', 'dnf', 'yum'] or ansible_distribution in ['AIX'] - - set_fact: output_dir_test={{output_dir}}/at - name: make sure our testing sub-directory does not exist - file: - path: "{{ output_dir_test }}" - state: absent + file: path="{{ output_dir_test }}" state=absent - name: create our testing sub-directory - file: - path: "{{ output_dir_test }}" - state: directory + file: path="{{ output_dir_test }}" state=directory ## ## at ## +- name: define distros to attempt installing at on + set_fact: + package_distros: + - RedHat + - CentOS + - ScientificLinux + - Fedora + - Ubuntu + - Debian + - openSUSE Leap + - name: ensure at is installed package: name: at state: present - when: ansible_pkg_mgr in ['apt', 'dnf', 'yum'] + when: ansible_distribution in package_distros - name: run the first example at: diff --git a/tests/integration/targets/patch/aliases b/tests/integration/targets/patch/aliases index 3a07aab..cc64ede 100644 --- a/tests/integration/targets/patch/aliases +++ b/tests/integration/targets/patch/aliases @@ -1,3 +1,4 @@ destructive shippable/posix/group1 skip/aix +disabled # fixme package diff --git a/tests/integration/targets/patch/tasks/main.yml b/tests/integration/targets/patch/tasks/main.yml index 19a70ec..90e9837 100644 --- a/tests/integration/targets/patch/tasks/main.yml +++ b/tests/integration/targets/patch/tasks/main.yml @@ -1,76 +1,55 @@ -- debug: - msg: >- - Skipping {{ ansible_distribution }} as ansible-base does not contain - the packaging module ({{ ansible_pkg_mgr }}) for this operating system - when: ansible_pkg_mgr not in ['apt', 'dnf', 'yum'] - -- name: stop executing on hosts that we don't have package manager modules for - meta: end_host - when: ansible_pkg_mgr not in ['apt', 'dnf', 'yum'] - - name: ensure idempotency installed package: name: patch - when: ansible_pkg_mgr in ['apt', 'dnf', 'yum'] - + when: ansible_distribution != "MacOSX" - name: create a directory for the result file: dest: '{{ output_dir }}/patch' state: directory register: result - - name: assert the directory was created assert: that: - result.state == 'directory' - - name: copy the origin file copy: src: ./origin.txt dest: '{{ output_dir }}/patch/workfile.txt' register: result - - name: patch the origin file in check mode check_mode: true register: result patch: src: result.patch dest: '{{ output_dir }}/patch/workfile.txt' - - name: verify patch the origin file in check mode assert: that: - result is changed - - name: patch the origin file register: result patch: src: result.patch dest: '{{ output_dir }}/patch/workfile.txt' - - name: verify patch the origin file assert: that: - result is changed - - name: test patch the origin file idempotency register: result patch: src: result.patch dest: '{{ output_dir }}/patch/workfile.txt' - - name: verify test patch the origin file idempotency assert: that: - result is not changed - - name: verify the resulted file matches expectations copy: src: ./result.txt dest: '{{ output_dir }}/patch/workfile.txt' register: result failed_when: result is changed - - name: patch the workfile file in check mode state absent check_mode: true register: result @@ -78,36 +57,30 @@ src: result.patch dest: '{{ output_dir }}/patch/workfile.txt' state: absent - - name: verify patch the workfile file in check mode state absent assert: that: - result is changed - - name: patch the workfile file state absent register: result patch: src: result.patch dest: '{{ output_dir }}/patch/workfile.txt' state: absent - - name: verify patch the workfile file state absent assert: that: - result is changed - - name: patch the workfile file state absent idempotency register: result patch: src: result.patch dest: '{{ output_dir }}/patch/workfile.txt' state: absent - - name: verify patch the workfile file state absent idempotency assert: that: - result is not changed - - name: verify the resulted file matches expectations copy: src: ./origin.txt diff --git a/tests/integration/targets/synchronize/aliases b/tests/integration/targets/synchronize/aliases index a6dafcf..781048b 100644 --- a/tests/integration/targets/synchronize/aliases +++ b/tests/integration/targets/synchronize/aliases @@ -1 +1,2 @@ shippable/posix/group1 +disabled # fixme package diff --git a/tests/integration/targets/synchronize/tasks/main.yml b/tests/integration/targets/synchronize/tasks/main.yml index 355729c..ac1aa03 100644 --- a/tests/integration/targets/synchronize/tasks/main.yml +++ b/tests/integration/targets/synchronize/tasks/main.yml @@ -1,18 +1,7 @@ -- debug: - msg: >- - Skipping {{ ansible_distribution }} as ansible-base does not contain - the packaging module ({{ ansible_pkg_mgr }}) for this operating system - when: ansible_pkg_mgr not in ['apt', 'dnf', 'yum'] - -- name: stop executing on hosts that we don't have package manager modules for - meta: end_host - when: ansible_pkg_mgr not in ['apt', 'dnf', 'yum'] - - name: install rsync package: name: rsync - when: ansible_pkg_mgr in ['apt', 'dnf', 'yum'] - + when: ansible_distribution != "MacOSX" - name: cleanup old files shell: rm -rf {{output_dir}}/* - name: create test new files