diff --git a/tests/roles/standard-test-overlay/README.md b/tests/roles/standard-test-overlay/README.md deleted file mode 100644 index 17ac2f4..0000000 --- a/tests/roles/standard-test-overlay/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Ansible role for overlaying Atomic Host packages - -Certain Atomic Host use cases require that packages are -overlaid onto the host. This role allows you to do that. - -You should not use this role to indiscriminately overlay test -dependencies into the Atomic Host unless those dependencies are -part of a real end user story. - -You should define the following variables: - - * packages: A list of packages to overlay diff --git a/tests/roles/standard-test-overlay/tasks/main.yml b/tests/roles/standard-test-overlay/tasks/main.yml deleted file mode 100644 index 51b6a0b..0000000 --- a/tests/roles/standard-test-overlay/tasks/main.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -- block: - - name: Overlaying end user packages onto Atomic Host - shell: rpm-ostree install {{ packages | join(" ") }} - - - name: Reboot the Atomic Host - shell: sleep 2 && systemctl reboot - ignore_errors: true - async: 1 - poll: 0 - - - name: Waiting for Atomic Host to restart - local_action: wait_for host={{ ansible_ssh_host }} search_regex=OpenSSH port={{ ansible_ssh_port }} timeout=300 delay=20 connect_timeout=20 - become: false - - # All these commands only apply to Atomic Host - tags: atomic diff --git a/tests/roles/standard-test-overlay/vars/main.yml b/tests/roles/standard-test-overlay/vars/main.yml deleted file mode 100644 index b6e94dd..0000000 --- a/tests/roles/standard-test-overlay/vars/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -packages: [] diff --git a/tests/roles/standard-test-scripts/README.md b/tests/roles/standard-test-scripts/README.md deleted file mode 100644 index d407bcc..0000000 --- a/tests/roles/standard-test-scripts/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# Ansible role for executing test scripts - -Put this role in your tests.yml playbook and specify a -number of test scripts to execute as tests. The results -of each script will be piped into log file in the artifacts -directory. If any script exits with a non-zero exit code -the role will fail. - -In the case of test subjects such a host or container, these -test scripts and related files will be copied to the target into -/var/tmp/tests before execution. - -You should define the following variables: - - * tests: An array of scripts to run - * files: A list of files or directories needed by the scripts - diff --git a/tests/roles/standard-test-scripts/defaults/main.yml b/tests/roles/standard-test-scripts/defaults/main.yml deleted file mode 100644 index ceb88f4..0000000 --- a/tests/roles/standard-test-scripts/defaults/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -artifacts: "{{ lookup('env', 'TEST_ARTIFACTS') | default('./artifacts', true) }}" diff --git a/tests/roles/standard-test-scripts/tasks/main.yml b/tests/roles/standard-test-scripts/tasks/main.yml deleted file mode 100644 index bddd620..0000000 --- a/tests/roles/standard-test-scripts/tasks/main.yml +++ /dev/null @@ -1,48 +0,0 @@ ---- -- name: Install testing requirements - package: name={{ item }} state=present - with_items: - - rsync - when: ansible_pkg_mgr != 'unknown' - -- name: Copy test scripts to target - synchronize: - src: "{{ item }}" - dest: /var/tmp/tests/ - ssh_args: "-o UserKnownHostsFile=/dev/null" - with_items: - - "{{ tests }}" - - "{{ files }}" - -- block: - - name: Execute test scripts - shell: | - set -e - mkdir -p /var/tmp/artifacts - logfile=/var/tmp/artifacts/test.$(echo {{ item }} | sed -e 's/\//-/g').log - exec 2>>$logfile 1>>$logfile - cd /var/tmp/tests - if [ -x {{ item }} ]; then - ./$(basename {{ item }}) && result="PASS" || result="FAIL" - else - /bin/sh -e ./$(basename {{ item }}) && result="PASS" || result="FAIL" - fi - echo "$result {{ item }}" >> /var/tmp/artifacts/test.log - with_items: - - "{{ tests }}" - - always: - - name: Pull out the logs - synchronize: - dest: "{{ artifacts }}" - src: "/var/tmp/artifacts/./" - mode: pull - ssh_args: "-o UserKnownHostsFile=/dev/null" - when: artifacts|default("") != "" - - # Can't go in block. See - # https://github.com/ansible/ansible/issues/20736 - - name: Check the results - shell: grep "^FAIL" /var/tmp/artifacts/test.log - register: test_fails - failed_when: test_fails.stdout or test_fails.stderr diff --git a/tests/roles/standard-test-scripts/vars/main.yml b/tests/roles/standard-test-scripts/vars/main.yml deleted file mode 100644 index 81108ab..0000000 --- a/tests/roles/standard-test-scripts/vars/main.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -tests: [] -files: [] diff --git a/tests/roles/standard-test-source/README.md b/tests/roles/standard-test-source/README.md deleted file mode 100644 index 49b1245..0000000 --- a/tests/roles/standard-test-source/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Ansible role for Upstream source tarball tests - -Put this role in your tests.yml playbook. The playbook -will extract the upstream source tarball as described in -the package spec file into a test/source/ directory. You -can then use or execute files (usually tests) from the -upstream sources in your playbook. - -You can redefine the following variables: - - * srcdir: A directory to extract sources into. This defaults - to {{ playbook_dir }}/source/ diff --git a/tests/roles/standard-test-source/defaults/main.yml b/tests/roles/standard-test-source/defaults/main.yml deleted file mode 100644 index ceb88f4..0000000 --- a/tests/roles/standard-test-source/defaults/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -artifacts: "{{ lookup('env', 'TEST_ARTIFACTS') | default('./artifacts', true) }}" diff --git a/tests/roles/standard-test-source/tasks/main.yml b/tests/roles/standard-test-source/tasks/main.yml deleted file mode 100644 index cc2c4a9..0000000 --- a/tests/roles/standard-test-source/tasks/main.yml +++ /dev/null @@ -1,30 +0,0 @@ ---- -- name: Add executor host - add_host: - name: executor - ansible_connection: local - ansible_ssh_host: 127.0.0.1 - ansible_ssh_connection: local - -- name: Extract package source code - delegate_to: executor - block: - - name: Gather facts - setup: - delegate_facts: True - - - name: Install requirements - package: name={{item}} state=present - with_items: - - fedpkg - - # The dist doesn't actually matter here - - name: Download sources, extract, and strip leading path - shell: | - shopt -s dotglob - set -e - rm -rf {{ srcdir }} - fedpkg --release=master prep --builddir={{ srcdir }} - mv {{ srcdir }}/*/* {{ srcdir }} - args: - chdir: "{{playbook_dir}}/.." diff --git a/tests/roles/standard-test-source/vars/main.yml b/tests/roles/standard-test-source/vars/main.yml deleted file mode 100644 index 12a4a4c..0000000 --- a/tests/roles/standard-test-source/vars/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -srcdir: "{{ playbook_dir }}/source"