- import_playbook: prepare.yml
# Tests for basic role
- hosts: localhost
tags:
- atomic
- classic
- container
roles:
- role: standard-test-basic
tests:
- test-basic-simple
- test-basic-parameters:
dir: ./
run: echo "check parameters on basic role" | grep "check parameters on basic role"
required_packages:
# Test if we can install required packages
- "{{req_pkg}}"
tasks:
- import_tasks: shared-tasks/artifacts_test_env.yml
- import_tasks: shared-tasks/artifacts_test_runner.yml
# Make sure the role behaves correctly if test fails
- hosts: localhost
tags:
- atomic
- classic
- container
roles:
- role: standard-test-basic
tests:
- test-basic-fail
ignore_errors: yes
tasks:
# 'verify_failed_test' tasks should run after 'test-basic-fail'
- import_tasks: shared-tasks/verify_failed_test.yml
- import_tasks: shared-tasks/artifacts_test_env.yml
- import_tasks: shared-tasks/artifacts_test_runner.yml