From 897c6ad0f22b59442fdf1d6dbecf7ccd69fd776b Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 29 Mar 2020 13:32:09 +0200 Subject: [PATCH] Remove patch tests. (#65) --- tests/integration/targets/patch/aliases | 3 - .../targets/patch/files/origin.txt | 19 ---- .../targets/patch/files/result.patch | 24 ---- .../targets/patch/files/result.txt | 13 --- tests/integration/targets/patch/meta/main.yml | 3 - .../integration/targets/patch/tasks/main.yml | 107 ------------------ 6 files changed, 169 deletions(-) delete mode 100644 tests/integration/targets/patch/aliases delete mode 100644 tests/integration/targets/patch/files/origin.txt delete mode 100644 tests/integration/targets/patch/files/result.patch delete mode 100644 tests/integration/targets/patch/files/result.txt delete mode 100644 tests/integration/targets/patch/meta/main.yml delete mode 100644 tests/integration/targets/patch/tasks/main.yml diff --git a/tests/integration/targets/patch/aliases b/tests/integration/targets/patch/aliases deleted file mode 100644 index 9a80b36fe0..0000000000 --- a/tests/integration/targets/patch/aliases +++ /dev/null @@ -1,3 +0,0 @@ -destructive -shippable/posix/group2 -skip/aix diff --git a/tests/integration/targets/patch/files/origin.txt b/tests/integration/targets/patch/files/origin.txt deleted file mode 100644 index 0ef3d73958..0000000000 --- a/tests/integration/targets/patch/files/origin.txt +++ /dev/null @@ -1,19 +0,0 @@ -Stet clita kasd gubergren,no sea takimata sanctus est Lorem ipsum dolor -sit amet. - -Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod -tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At -vero eos et accusam et justo duo dolores et ea rebum. - -Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor -sit amet. - -Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod -tempor invidunt ut labore et dolore magna aliquyam erat. - -Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod -tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At -vero eos et accusam et justo duo dolores et ea rebum. - -Stet clita kasd gubergren,no sea takimata sanctus est Lorem ipsum dolor -sit amet. diff --git a/tests/integration/targets/patch/files/result.patch b/tests/integration/targets/patch/files/result.patch deleted file mode 100644 index d672b1e463..0000000000 --- a/tests/integration/targets/patch/files/result.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- origin.txt 2018-05-12 10:22:14.155109584 +0200 -+++ result.txt 2018-05-12 10:18:07.230811204 +0200 -@@ -2,18 +2,12 @@ - sit amet. - - Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod --tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At --vero eos et accusam et justo duo dolores et ea rebum. -- --Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor --sit amet. -- --Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod --tempor invidunt ut labore et dolore magna aliquyam erat. -+tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. -+At vero eos et accusam et justo duo dolores et ea rebum. - - Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod - tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At - vero eos et accusam et justo duo dolores et ea rebum. - --Stet clita kasd gubergren,no sea takimata sanctus est Lorem ipsum dolor -+Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor - sit amet. diff --git a/tests/integration/targets/patch/files/result.txt b/tests/integration/targets/patch/files/result.txt deleted file mode 100644 index ec40e3b1e5..0000000000 --- a/tests/integration/targets/patch/files/result.txt +++ /dev/null @@ -1,13 +0,0 @@ -Stet clita kasd gubergren,no sea takimata sanctus est Lorem ipsum dolor -sit amet. - -Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod -tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. -At vero eos et accusam et justo duo dolores et ea rebum. - -Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod -tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At -vero eos et accusam et justo duo dolores et ea rebum. - -Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor -sit amet. diff --git a/tests/integration/targets/patch/meta/main.yml b/tests/integration/targets/patch/meta/main.yml deleted file mode 100644 index 8828391177..0000000000 --- a/tests/integration/targets/patch/meta/main.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -dependencies: - - prepare_tests diff --git a/tests/integration/targets/patch/tasks/main.yml b/tests/integration/targets/patch/tasks/main.yml deleted file mode 100644 index 1fbe1a5d79..0000000000 --- a/tests/integration/targets/patch/tasks/main.yml +++ /dev/null @@ -1,107 +0,0 @@ ---- -- name: ensure idempotency installed - package: - name: patch - 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 - patch: - src: result.patch - dest: "{{ output_dir }}/patch/workfile.txt" - check_mode: yes - register: result - -- name: verify patch the origin file in check mode - assert: - that: - - result is changed - -- name: patch the origin file - patch: - src: result.patch - dest: "{{ output_dir }}/patch/workfile.txt" - register: result - -- name: verify patch the origin file - assert: - that: - - result is changed - -- name: test patch the origin file idempotency - patch: - src: result.patch - dest: "{{ output_dir }}/patch/workfile.txt" - register: result - -- 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 - patch: - src: result.patch - dest: "{{ output_dir }}/patch/workfile.txt" - state: absent - check_mode: yes - register: result - -- name: verify patch the workfile file in check mode state absent - assert: - that: - - result is changed - -- name: patch the workfile file state absent - patch: - src: result.patch - dest: "{{ output_dir }}/patch/workfile.txt" - state: absent - register: result - -- name: verify patch the workfile file state absent - assert: - that: - - result is changed - -- name: patch the workfile file state absent idempotency - patch: - src: result.patch - dest: "{{ output_dir }}/patch/workfile.txt" - state: absent - register: result - -- 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" - dest: "{{ output_dir }}/patch/workfile.txt" - register: result - failed_when: result is changed