Run actual integration tests for the ara-api role jobs

We ran the role but not the integration tests, run tests too.

Change-Id: I64d4befa4e7acd172078bc2d5de54c0233229bdd
This commit is contained in:
David Moreau Simard 2019-06-21 13:34:35 -04:00
parent b632aae7d8
commit b3b0cb1c1f
2 changed files with 38 additions and 1 deletions

View File

@ -12,7 +12,6 @@
- requirements.txt
- test-requirements.txt
pre-run: tests/role-integration-pre.yaml
run: playbooks/ara_api.yaml
post-run: tests/role-integration-post.yaml
vars:
ara_tests_cleanup: false
@ -40,6 +39,7 @@
- job:
name: ansible-role-ara-api-fedora-devel
parent: ansible-role-ara-api-fedora
run: tests/with_defaults.yaml
required-projects:
- name: github.com/ansible/ansible
override-checkout: devel
@ -47,6 +47,7 @@
- job:
name: ansible-role-ara-api-fedora-2.8
parent: ansible-role-ara-api-fedora
run: tests/with_defaults.yaml
required-projects:
- name: github.com/ansible/ansible
override-checkout: stable-2.8
@ -54,6 +55,7 @@
- job:
name: ansible-role-ara-api-ubuntu-2.7
parent: ansible-role-ara-api-ubuntu
run: tests/with_defaults.yaml
required-projects:
- name: github.com/ansible/ansible
override-checkout: stable-2.7
@ -61,6 +63,7 @@
- job:
name: ansible-role-ara-api-ubuntu-2.6
parent: ansible-role-ara-api-ubuntu
run: tests/with_defaults.yaml
required-projects:
- name: github.com/ansible/ansible
override-checkout: stable-2.6

34
tests/with_defaults.yaml Normal file
View File

@ -0,0 +1,34 @@
# Copyright (c) 2019 Red Hat, Inc.
#
# This file is part of ARA Records Ansible.
#
# ARA is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# ARA is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with ARA. If not, see <http://www.gnu.org/licenses/>.
- name: Test the ARA API with defaults
hosts: all
gather_facts: yes
vars:
ara_api_root_dir: "{{ ansible_user_dir }}/.ara-tests"
ara_api_secret_key: testing
ara_api_debug: true
ara_api_log_level: DEBUG
tasks:
- block:
- name: Set up the API with the ara_api role
import_role:
name: ara_api
# These are tasks rather than a standalone playbook to give us an easy
# access to all the variables within the same play.
- include_tasks: test_tasks.yaml