Changeset - 490c7b153f52
[Not reviewed]
0 2 0
Branko Majic (branko) - 7 years ago 2017-07-21 11:36:49
branko@majic.rs
Noticket: Improved logic behind a couple of tests that use commands to ensure a specific error is happening for tests to pass.
2 files changed with 4 insertions and 0 deletions:
0 comments (0 inline, 0 general)
roles/ldap_server/tests/test_mandatory.py
Show inline comments
 
@@ -101,6 +101,7 @@ def test_tls_configuration(Command):
 

	
 
    cipher = Command("echo 'Q' | openssl s_client -cipher ECDHE-RSA-AES128-SHA -connect parameters-mandatory:636")
 
    assert cipher.rc != 0
 
    assert "CONNECTED" in cipher.stdout
 
    assert "ECDHE-RSA-AES128-SHA" not in cipher.stdout
 

	
 

	
roles/mail_server/tests/test_mandatory.py
Show inline comments
 
@@ -169,10 +169,12 @@ def test_imap_tls_configuration(Command):
 
    # Test weaker TLS cipher are disabled.
 
    starttls_cipher = Command("echo 'a0001 LOGOUT' | openssl s_client -starttls imap -cipher ECDHE-RSA-AES128-SHA -connect parameters-mandatory:143")
 
    assert starttls_cipher.rc != 0
 
    assert "CONNECTED" in starttls_cipher.stdout
 
    assert "ECDHE-RSA-AES128-SHA" not in starttls_cipher.stdout
 

	
 
    tls_cipher = Command("echo 'a0001 LOGOUT' | openssl s_client -cipher ECDHE-RSA-AES128-SHA -connect parameters-mandatory:993")
 
    assert tls_cipher.rc != 0
 
    assert "CONNECTED" in tls_cipher.stdout
 
    assert "ECDHE-RSA-AES128-SHA" not in tls_cipher.stdout
 

	
 

	
 
@@ -244,6 +246,7 @@ def test_postfix_tls_configuration(Command):
 

	
 
    starttls_cipher = Command("echo 'QUIT' | openssl s_client -starttls smtp -cipher ECDHE-RSA-AES128-SHA -connect parameters-mandatory:587")
 
    assert starttls_cipher.rc != 0
 
    assert "CONNECTED" in starttls_cipher.stdout
 
    assert "ECDHE-RSA-AES128-SHA" not in starttls_cipher.stdout
 

	
 

	
0 comments (0 inline, 0 general)