diff --git a/tasks/sni.yml b/tasks/sni.yml index c820b3873ef5a7548edba54b9ae7cbc3b01c582e..7546671a86e0c7a48996f15f27346cb075743c7d 100644 --- a/tasks/sni.yml +++ b/tasks/sni.yml @@ -16,11 +16,9 @@ - name: pip install SSL SNI support with_items: - - pip>=9.0.1 - urllib3[secure]>=1.11 - ndg-httpsclient>=0.4.0 - - setuptools[certs]>=28.1.0 - - requests[security]>=2.12.1 + - pyasn1 pip: name: '{{ item }}' state: present diff --git a/tests/playbook.yml b/tests/playbook.yml index 541cf587ca8309c75d5b035dcdb65df6b1fb4287..7eb9cdc76ce6174b4504f2b93c6b5c801a8dfce0 100644 --- a/tests/playbook.yml +++ b/tests/playbook.yml @@ -20,3 +20,15 @@ - hosts: all roles: - role: python27 + post_tasks: + - name: Test SNI + get_url: + url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key + dest: /tmp/nodesource.gpg.key + changed_when: False + + - name: Test pip install + pip: + name: netaddr + state: present + changed_when: False diff --git a/tests/test_sni.py b/tests/test_sni.py deleted file mode 100644 index eaddde1e3433e145f334ef934a806efe44d0e90e..0000000000000000000000000000000000000000 --- a/tests/test_sni.py +++ /dev/null @@ -1,12 +0,0 @@ -import pytest -from testinfra.utils.ansible_runner import AnsibleRunner - -testinfra_hosts = AnsibleRunner('.molecule/ansible_inventory').get_hosts('all') - - -@pytest.mark.xfail -@pytest.mark.parametrize('error', [ - 'InsecureRequestWarning', 'InsecurePlatformWarning', 'SNIMissingWarning' -]) -def test_sni(Command, error): - assert error not in Command('pip2 install nonexistant-package').stderr