From b3b0cb1c1f680d4d79137a2549b0757f63477e73 Mon Sep 17 00:00:00 2001 From: David Moreau Simard Date: Fri, 21 Jun 2019 13:34:35 -0400 Subject: [PATCH] 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 --- .zuul.d/role-jobs.yaml | 5 ++++- tests/with_defaults.yaml | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 tests/with_defaults.yaml diff --git a/.zuul.d/role-jobs.yaml b/.zuul.d/role-jobs.yaml index 013095fc..41efa369 100644 --- a/.zuul.d/role-jobs.yaml +++ b/.zuul.d/role-jobs.yaml @@ -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 diff --git a/tests/with_defaults.yaml b/tests/with_defaults.yaml new file mode 100644 index 00000000..b286e016 --- /dev/null +++ b/tests/with_defaults.yaml @@ -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 . + +- 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