Skip to content
Snippets Groups Projects
Commit 99a9d6ad authored by nimrod's avatar nimrod
Browse files

- Added TLS 1.2 test.

parent eb340715
Branches
No related tags found
No related merge requests found
...@@ -4,8 +4,15 @@ from testinfra.utils.ansible_runner import AnsibleRunner ...@@ -4,8 +4,15 @@ from testinfra.utils.ansible_runner import AnsibleRunner
testinfra_hosts = AnsibleRunner('.molecule/ansible_inventory').get_hosts('all') testinfra_hosts = AnsibleRunner('.molecule/ansible_inventory').get_hosts('all')
@pytest.mark.parametrize('error', ['InsecureRequestWarning', @pytest.mark.parametrize('error', [
'InsecurePlatformWarning', 'InsecureRequestWarning', 'InsecurePlatformWarning', 'SNIMissingWarning'
'SNIMissingWarning']) ])
def test_sni(Command, error): def test_sni(Command, error):
assert error not in Command('pip install nonexistant-package').stderr assert error not in Command('pip2 install nonexistant-package').stderr
def test_tls12(Command):
pycommand = '''import requests;
print(requests.get('https://www.howsmyssl.com/a/check',
verify=False).json()['tls_version'])'''
assert 'TLS 1.2' == Command('python2 -c \"%s\"' % pycommand).stdout.strip()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment