From 277087f549a6814702c17a2fa2c3e92d2e50b1a4 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Wed, 22 Jan 2020 11:55:34 +0000 Subject: [PATCH] Assure pyyaml is installed before running sova test Avoids failure when ansible was running inside a virtualenv due to unavailability of --user mode. In the future sova test should be switched to a container instead of delegated as delegated is testing compatibility build build node used by tox (bionic), under a tox virtualenv, something that diverge considerably from production use. Change-Id: Idd79b493fe9f6d37005484239e532793a06ea356 --- bindep.txt | 1 + molecule/sova/molecule.yml | 1 + molecule/sova/prepare.yml | 5 ----- tox.ini | 1 + 4 files changed, 3 insertions(+), 5 deletions(-) create mode 100644 bindep.txt diff --git a/bindep.txt b/bindep.txt new file mode 100644 index 0000000..679426b --- /dev/null +++ b/bindep.txt @@ -0,0 +1 @@ +python3-yaml [platform:ubuntu] diff --git a/molecule/sova/molecule.yml b/molecule/sova/molecule.yml index 264c8a9..3c30f22 100644 --- a/molecule/sova/molecule.yml +++ b/molecule/sova/molecule.yml @@ -15,6 +15,7 @@ provisioner: name: ansible config_options: defaults: + interpreter_python: auto timeout: 30 forks: 500 inventory: diff --git a/molecule/sova/prepare.yml b/molecule/sova/prepare.yml index e337c04..d8d6c3a 100644 --- a/molecule/sova/prepare.yml +++ b/molecule/sova/prepare.yml @@ -3,11 +3,6 @@ hosts: all tasks: - - name: Install python YAML module - pip: - name: pyyaml - extra_args: --user - - name: Prepare the console file directory file: path: '{{ ansible_user_dir }}/workspace/logs/' diff --git a/tox.ini b/tox.ini index b5b273c..94818c2 100644 --- a/tox.ini +++ b/tox.ini @@ -62,6 +62,7 @@ deps = pytest-html # MPL 2.0 pytest-molecule>=1.2.4 # MIT pytest-xdist + pyyaml selinux>=0.2.1 # MIT commands = python -m pytest --color=yes --html={envlogdir}/reports.html --self-contained-html {tty:-s} {posargs}