From 1b3ff44bc2c77676ec8903afb42bd36326756f03 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 16 Sep 2020 10:48:43 +0200 Subject: [PATCH] Avoid cffi 1.14.3 to be installed in CI by old pip versions (#110) * Avoid cffi 1.14.3 to be installed in CI by old pip versions. * Avoid too old version being installed. * Add missing target. --- tests/integration/targets/setup_openssl/meta/main.yml | 1 + tests/integration/targets/setup_openssl/tasks/main.yml | 1 + .../integration/targets/setup_remote_constraints/aliases | 1 + .../targets/setup_remote_constraints/meta/main.yml | 2 ++ .../targets/setup_remote_constraints/tasks/main.yml | 8 ++++++++ tests/utils/constraints.txt | 1 + 6 files changed, 14 insertions(+) create mode 100644 tests/integration/targets/setup_remote_constraints/aliases create mode 100644 tests/integration/targets/setup_remote_constraints/meta/main.yml create mode 100644 tests/integration/targets/setup_remote_constraints/tasks/main.yml diff --git a/tests/integration/targets/setup_openssl/meta/main.yml b/tests/integration/targets/setup_openssl/meta/main.yml index 5438ced5..2be15776 100644 --- a/tests/integration/targets/setup_openssl/meta/main.yml +++ b/tests/integration/targets/setup_openssl/meta/main.yml @@ -1,2 +1,3 @@ dependencies: + - setup_remote_constraints - setup_pkg_mgr diff --git a/tests/integration/targets/setup_openssl/tasks/main.yml b/tests/integration/targets/setup_openssl/tasks/main.yml index 5a634458..fa9f0873 100644 --- a/tests/integration/targets/setup_openssl/tasks/main.yml +++ b/tests/integration/targets/setup_openssl/tasks/main.yml @@ -25,6 +25,7 @@ become: True pip: name: pyOpenSSL + extra_args: "-c {{ remote_constraints }}" when: ansible_os_family == 'Darwin' - name: register pyOpenSSL version diff --git a/tests/integration/targets/setup_remote_constraints/aliases b/tests/integration/targets/setup_remote_constraints/aliases new file mode 100644 index 00000000..1ad133ba --- /dev/null +++ b/tests/integration/targets/setup_remote_constraints/aliases @@ -0,0 +1 @@ +needs/file/tests/utils/constraints.txt diff --git a/tests/integration/targets/setup_remote_constraints/meta/main.yml b/tests/integration/targets/setup_remote_constraints/meta/main.yml new file mode 100644 index 00000000..1810d4be --- /dev/null +++ b/tests/integration/targets/setup_remote_constraints/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - setup_remote_tmp_dir diff --git a/tests/integration/targets/setup_remote_constraints/tasks/main.yml b/tests/integration/targets/setup_remote_constraints/tasks/main.yml new file mode 100644 index 00000000..d19d929a --- /dev/null +++ b/tests/integration/targets/setup_remote_constraints/tasks/main.yml @@ -0,0 +1,8 @@ +- name: record constraints.txt path on remote host + set_fact: + remote_constraints: "{{ remote_tmp_dir }}/constraints.txt" + +- name: copy constraints.txt to remote host + copy: + src: "{{ role_path }}/../../../utils/constraints.txt" + dest: "{{ remote_constraints }}" diff --git a/tests/utils/constraints.txt b/tests/utils/constraints.txt index b96d623c..ae6000ae 100644 --- a/tests/utils/constraints.txt +++ b/tests/utils/constraints.txt @@ -40,6 +40,7 @@ boto3 < 1.11 ; python_version < '2.7' # boto3 1.11 drops Python 2.6 support botocore >= 1.10.0, < 1.14 ; python_version < '2.7' # adds support for the following AWS services: secretsmanager, fms, and acm-pca; botocore 1.14 drops Python 2.6 support botocore >= 1.10.0 ; python_version >= '2.7' # adds support for the following AWS services: secretsmanager, fms, and acm-pca setuptools < 45 ; python_version <= '2.7' # setuptools 45 and later require python 3.5 or later +cffi >= 1.14.2, != 1.14.3 # Yanked version which older versions of pip will still install: # freeze pylint and its requirements for consistent test results astroid == 2.2.5