Remove old testing YAML
Signed-off-by: Major Hayden <major@redhat.com>
This commit is contained in:
parent
7ca9579487
commit
61e6e5f500
4 changed files with 0 additions and 167 deletions
|
|
@ -1,51 +0,0 @@
|
||||||
---
|
|
||||||
|
|
||||||
- name: Run osbuild-composer tests
|
|
||||||
hosts: localhost
|
|
||||||
become: yes
|
|
||||||
vars:
|
|
||||||
passed_tests: []
|
|
||||||
failed_tests: []
|
|
||||||
vars_files:
|
|
||||||
- vars.yml
|
|
||||||
tasks:
|
|
||||||
|
|
||||||
- name: Install osbuild-composer-tests
|
|
||||||
dnf:
|
|
||||||
name: osbuild-composer-tests
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: Run osbuild-composer base tests
|
|
||||||
include_tasks: test_runner_base.yml
|
|
||||||
loop: "{{ osbuild_composer_base_tests }}"
|
|
||||||
loop_control:
|
|
||||||
loop_var: test
|
|
||||||
when:
|
|
||||||
- test_type == 'base'
|
|
||||||
|
|
||||||
- name: Run osbuild-composer image tests
|
|
||||||
include_tasks: test_runner_image.yml
|
|
||||||
loop: "{{ osbuild_composer_image_test_cases }}"
|
|
||||||
loop_control:
|
|
||||||
loop_var: test_case
|
|
||||||
vars:
|
|
||||||
env_vars: "{{ osbuild_composer_image_env_vars }}"
|
|
||||||
when:
|
|
||||||
- test_type == 'image'
|
|
||||||
|
|
||||||
- name: Show failed and passed tests
|
|
||||||
debug:
|
|
||||||
msg: |
|
|
||||||
Passed tests: {{ 'None' if not passed_tests else '' }}
|
|
||||||
{% for test_name in passed_tests %}
|
|
||||||
- {{ test_name }}
|
|
||||||
{% endfor %}
|
|
||||||
Failed tests: {{ 'None' if not failed_tests else '' }}
|
|
||||||
{% for test_name in failed_tests %}
|
|
||||||
- {{ test_name }}
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
- name: Fail the test run if a test failed
|
|
||||||
fail:
|
|
||||||
msg: One or more tests failed.
|
|
||||||
when: failed_tests
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
---
|
|
||||||
|
|
||||||
- block:
|
|
||||||
|
|
||||||
- name: "Run {{ test }} test"
|
|
||||||
command: "{{ tests_path }}/{{ test }} -test.v"
|
|
||||||
args:
|
|
||||||
chdir: "{{ tests_working_directory }}"
|
|
||||||
register: test_cmd
|
|
||||||
|
|
||||||
- name: "Mark {{ test }} as passed"
|
|
||||||
set_fact:
|
|
||||||
passed_tests: "{{ passed_tests + [test] }}"
|
|
||||||
|
|
||||||
rescue:
|
|
||||||
|
|
||||||
- name: "Mark {{ test }} as failed"
|
|
||||||
set_fact:
|
|
||||||
failed_tests: "{{ failed_tests + [test] }}"
|
|
||||||
|
|
||||||
always:
|
|
||||||
|
|
||||||
- name: "Write log for {{ test }}"
|
|
||||||
copy:
|
|
||||||
dest: "{{ workspace }}/{{ test }}.log"
|
|
||||||
content: |
|
|
||||||
Logs from {{ test }}
|
|
||||||
----------------------------------------------------------------------
|
|
||||||
stderr:
|
|
||||||
{{ test_cmd.stderr }}
|
|
||||||
----------------------------------------------------------------------
|
|
||||||
stdout:
|
|
||||||
{{ test_cmd.stdout }}
|
|
||||||
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
||||||
---
|
|
||||||
|
|
||||||
- name: Setup test case prefix based on distro and release
|
|
||||||
set_fact:
|
|
||||||
test_case_prefix: >-
|
|
||||||
{%- if ansible_distribution == "Fedora" -%}
|
|
||||||
fedora_{{ ansible_distribution_version }}-{{ ansible_machine }}
|
|
||||||
{%- else -%}
|
|
||||||
rhel_{{ ansible_distribution_version }}-{{ ansible_machine }}
|
|
||||||
{%- endif -%}
|
|
||||||
|
|
||||||
- block:
|
|
||||||
|
|
||||||
- name: "Run image test case: {{ test_case_prefix }}-{{ test_case }}"
|
|
||||||
command: |
|
|
||||||
{{ image_test_executable }} -test.v \
|
|
||||||
{{ image_test_case_path }}/{{ test_case_prefix }}-{{ test_case }}
|
|
||||||
args:
|
|
||||||
chdir: "{{ tests_working_directory }}"
|
|
||||||
environment: "{{ env_vars }}"
|
|
||||||
register: test_cmd
|
|
||||||
|
|
||||||
- name: "Mark test case as passed: {{ test_case_prefix }}-{{ test_case }}"
|
|
||||||
set_fact:
|
|
||||||
passed_tests: "{{ passed_tests + [ test_case_prefix + '-' + test_case ] }}"
|
|
||||||
|
|
||||||
rescue:
|
|
||||||
|
|
||||||
- name: "Mark test case as failed: {{ test_case_prefix }}-{{ test_case }}"
|
|
||||||
set_fact:
|
|
||||||
failed_tests: "{{ failed_tests + [ test_case_prefix + '-' + test_case ] }}"
|
|
||||||
|
|
||||||
always:
|
|
||||||
|
|
||||||
- name: "Write log for test case: {{ test_case_prefix }}-{{ test_case }}"
|
|
||||||
copy:
|
|
||||||
dest: "{{ workspace }}/{{ test_case_prefix }}-{{ test_case }}.log"
|
|
||||||
content: |
|
|
||||||
Logs from test case: {{ test_case_prefix }}-{{ test_case }}
|
|
||||||
----------------------------------------------------------------------
|
|
||||||
stderr:
|
|
||||||
{{ test_cmd.stderr }}
|
|
||||||
----------------------------------------------------------------------
|
|
||||||
stdout:
|
|
||||||
{{ test_cmd.stdout }}
|
|
||||||
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
## Global test variables
|
|
||||||
# Tests should use this as their working directory. This part is critical
|
|
||||||
# since dnf-json must be in $PATH.
|
|
||||||
tests_working_directory: /usr/libexec/osbuild-composer
|
|
||||||
|
|
||||||
# The test executables are here.
|
|
||||||
tests_path: /usr/libexec/tests/osbuild-composer
|
|
||||||
|
|
||||||
# Frequency to check for completed tests.
|
|
||||||
polling_interval: 15
|
|
||||||
|
|
||||||
## Non-image test variables.
|
|
||||||
# List of base tests
|
|
||||||
osbuild_composer_base_tests:
|
|
||||||
- osbuild-weldr-tests
|
|
||||||
- osbuild-dnf-json-tests
|
|
||||||
- osbuild-tests
|
|
||||||
|
|
||||||
## Image test variables.
|
|
||||||
# Executable that runs image tests.
|
|
||||||
image_test_executable: "{{ tests_path }}/osbuild-image-tests"
|
|
||||||
|
|
||||||
# Location of image test case files.
|
|
||||||
image_test_case_path: /usr/share/tests/osbuild-composer/cases
|
|
||||||
|
|
||||||
# List of image tests
|
|
||||||
osbuild_composer_image_test_cases:
|
|
||||||
- openstack-boot.json
|
|
||||||
- qcow2-boot.json
|
|
||||||
- rhel_edge_commit-boot.json
|
|
||||||
- tar-boot.json
|
|
||||||
- vhd-boot.json
|
|
||||||
- vmdk-boot.json
|
|
||||||
|
|
||||||
# Environment variables for image tests.
|
|
||||||
osbuild_composer_image_env_vars: {}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue