Veronika Fisarova d00778f1cd Functional test for running validations from file
Functional tests for a change Ifc6c28003c4c2c5f3dd6198e650f9713a02dc82d

In order to use the 'validation_dir' and 'ansible_dir' parameters in the YAML file when executing the 'file' command, the original parameters 'validation_dir' and 'ansible_dir'  are changed to 'validation_dir_arg' and 'ansible_dir_arg' when using as a argument in the 'run' command.

Related-to: rhbz#2122209

Signed-off-by: Veronika Fisarova <vfisarov@redhat.com>
Change-Id: I56d974814987ef7a1cc105d4efe3123dd97f6b3e
2023-03-17 09:17:34 +01:00

37 lines
1.3 KiB
YAML

---
- name: List Validations - all - to file
shell:
cmd: "{{ validation_command }} list {{ validation_dir_arg }} -f json > {{ val_working_dir }}/list.log 2>&1"
executable: /bin/bash
when: val_format == "json"
- name: List Validations - all - to stdout - {{ val_format }}
shell:
cmd: "{{ validation_command }} list {{ validation_dir_arg }} -f {{ val_format }}"
executable: /bin/bash
# Metadata dependent list output
- name: List Validations - group - to stdout - {{ val_format }}
shell:
cmd: "{{ validation_command }} list {{ validation_dir_arg }} --group {{ val_group }} -f {{ val_format }}"
executable: /bin/bash
loop: "{{ validation_metadata.group }}"
loop_control:
loop_var: val_group
- name: " List Validations - category - to stdout - {{ val_format }} "
shell:
cmd: "{{ validation_command }} list {{ validation_dir_arg }} --category {{ val_category }} -f {{ val_format }}"
executable: /bin/bash
loop: "{{ validation_metadata.category }}"
loop_control:
loop_var: val_category
- name: "List Validations - product - to stdout - {{ val_format }}"
shell:
cmd: "{{ validation_command }} list {{ validation_dir_arg }} --product {{ val_product }} -f {{ val_format }}"
executable: /bin/bash
loop: "{{ validation_metadata.product }}"
loop_control:
loop_var: val_product