Fixed playbooks for gating

This commit is contained in:
Oliver Gutierrez 2021-08-23 19:25:13 +01:00
parent a6a68d9aae
commit 4fbf8c365e
No known key found for this signature in database
GPG Key ID: C4D0A809DC608C15
2 changed files with 8 additions and 3 deletions

View File

@ -2,7 +2,7 @@
- name: "{{ test.name }} | install test packages"
dnf: name="{{ test.package }}-tests" state=installed
- name: "{{ test.name }} | define helper variables"
- name: "{{ test.name }} | define helper variables"
set_fact:
test_name_oneword: "{{ test.name | replace(' ','-') }}"
@ -15,6 +15,7 @@
local_environment:
TEST_NAME: "{{ test.name }}"
TEST_PACKAGE: "{{ test.package }}"
TEST_ENV: "{{ test.environment }}"
- name: "{{ test.name }} | setup/teardown helper | see if exists"
local_action: stat path={{ role_path }}/files/helper.{{ test_name_oneword }}.sh
@ -30,7 +31,7 @@
chdir: /usr/share/{{ test.package }}/test/system
become: "{{ true if test.become is defined else false }}"
become_user: testuser
environment: "{{ local_environment }}"
environment: "{{ local_environment | combine(test.environment) }}"
- name: "{{ test.name }} | pull logs"
fetch:

View File

@ -8,4 +8,8 @@
- role: run_bats_tests
tests:
- name: toolbox
package: toolbox
package: toolbox
environment:
PODMAN: /usr/bin/podman
become: true