From 0d48732e7e226041ee3a3a5dc1b4fb1ed8ec2aa3 Mon Sep 17 00:00:00 2001 From: Andrea Tartaglia Date: Fri, 7 Jul 2017 22:11:53 +0100 Subject: [PATCH] Integration tests requirements (#26545) * Removed pexpect and jmespath requirement, install it in task directly * Removed passlib dependency --- test/integration/targets/expect/tasks/main.yml | 4 ++++ test/integration/targets/filters/filters.yml | 4 ++++ test/integration/targets/filters/runme.sh | 9 +++++++++ test/runner/requirements/integration.txt | 3 --- 4 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 test/integration/targets/filters/filters.yml create mode 100755 test/integration/targets/filters/runme.sh diff --git a/test/integration/targets/expect/tasks/main.yml b/test/integration/targets/expect/tasks/main.yml index 7a54d84aef..6980192748 100644 --- a/test/integration/targets/expect/tasks/main.yml +++ b/test/integration/targets/expect/tasks/main.yml @@ -15,6 +15,10 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +- name: Install test requirements + pip: + name: pexpect + state: present - name: record the test_command file set_fact: test_command_file={{output_dir | expanduser}}/test_command.py diff --git a/test/integration/targets/filters/filters.yml b/test/integration/targets/filters/filters.yml new file mode 100644 index 0000000000..81b9592b51 --- /dev/null +++ b/test/integration/targets/filters/filters.yml @@ -0,0 +1,4 @@ +- hosts: testhost + gather_facts: yes + roles: + - { role: filters } diff --git a/test/integration/targets/filters/runme.sh b/test/integration/targets/filters/runme.sh new file mode 100755 index 0000000000..c3a63730e3 --- /dev/null +++ b/test/integration/targets/filters/runme.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -eux + +# Requirements have to be installed prior to running ansible-playbook +# because plugins and requirements are loaded before the task runs +pip install jmespath + +ANSIBLE_ROLES_PATH=../ ansible-playbook filters.yml -i ../../inventory -e @../../integration_config.yml "$@" diff --git a/test/runner/requirements/integration.txt b/test/runner/requirements/integration.txt index 1ee3dc8e25..f827e9fce8 100644 --- a/test/runner/requirements/integration.txt +++ b/test/runner/requirements/integration.txt @@ -1,9 +1,6 @@ cryptography jinja2 -jmespath junit-xml ordereddict ; python_version < '2.7' paramiko -passlib -pexpect pyyaml