diff options
Diffstat (limited to 'ipatests/test_integration/test_advise.py')
-rw-r--r-- | ipatests/test_integration/test_advise.py | 64 |
1 files changed, 35 insertions, 29 deletions
diff --git a/ipatests/test_integration/test_advise.py b/ipatests/test_integration/test_advise.py index 98c30c651..3b821c879 100644 --- a/ipatests/test_integration/test_advise.py +++ b/ipatests/test_integration/test_advise.py @@ -49,8 +49,8 @@ class TestAdvice(IntegrationTest): topology = 'line' def test_invalid_advice(self): - advice_id = 'invalid-advise-param' - advice_regex = "invalid[\s]+\'advice\'.*" + advice_id = r'invalid-advise-param' + advice_regex = r"invalid[\s]+\'advice\'.*" raiseerr = False run_advice(self.master, advice_id, advice_regex, raiseerr) @@ -58,9 +58,9 @@ class TestAdvice(IntegrationTest): def test_advice_FreeBSDNSSPAM(self): advice_id = 'config-freebsd-nss-pam-ldapd' - advice_regex = "\#\!\/bin\/sh.*" \ - "pkg_add[\s]+\-r[\s]+nss\-pam\-ldapd[\s]+curl.*" \ - "\/usr\/local\/etc\/rc\.d\/nslcd[\s]+restart" + advice_regex = r"\#\!\/bin\/sh.*" \ + r"pkg_add[\s]+\-r[\s]+nss\-pam\-ldapd[\s]+curl.*" \ + r"\/usr\/local\/etc\/rc\.d\/nslcd[\s]+restart" raiseerr = True run_advice(self.master, advice_id, advice_regex, raiseerr) @@ -68,21 +68,23 @@ class TestAdvice(IntegrationTest): def test_advice_GenericNSSPAM(self): advice_id = 'config-generic-linux-nss-pam-ldapd' - advice_regex = "\#\!\/bin\/sh.*" \ - "apt\-get[\s]+\-y[\s]+install[\s]+curl[\s]+openssl[\s]+" \ - "libnss\-ldapd[\s]+libpam\-ldapd[\s]+nslcd.*" \ - "service[\s]+nscd[\s]+stop[\s]+\&\&[\s]+service[\s]+" \ - "nslcd[\s]+restart" + advice_regex = ( + r"\#\!\/bin\/sh.*" + r"apt\-get[\s]+\-y[\s]+install[\s]+curl[\s]+openssl[\s]+" + r"libnss\-ldapd[\s]+libpam\-ldapd[\s]+nslcd.*" + r"service[\s]+nscd[\s]+stop[\s]+\&\&[\s]+service[\s]+" + r"nslcd[\s]+restart" + ) raiseerr = True run_advice(self.master, advice_id, advice_regex, raiseerr) def test_advice_GenericSSSDBefore19(self): - advice_id = 'config-generic-linux-sssd-before-1-9' - advice_regex = "\#\!\/bin\/sh.*" \ - "apt\-get[\s]+\-y[\s]+install sssd curl openssl.*" \ - "service[\s]+sssd[\s]+start" + advice_id = r'config-generic-linux-sssd-before-1-9' + advice_regex = r"\#\!\/bin\/sh.*" \ + r"apt\-get[\s]+\-y[\s]+install sssd curl openssl.*" \ + r"service[\s]+sssd[\s]+start" raiseerr = True run_advice(self.master, advice_id, advice_regex, raiseerr) @@ -90,12 +92,14 @@ class TestAdvice(IntegrationTest): def test_advice_RedHatNSS(self): advice_id = 'config-redhat-nss-ldap' - advice_regex = "\#\!\/bin\/sh.*" \ - "yum[\s]+install[\s]+\-y[\s]+curl[\s]+openssl[\s]+nss_ldap" \ - "[\s]+authconfig.*authconfig[\s]+\-\-updateall" \ - "[\s]+\-\-enableldap[\s]+\-\-enableldaptls"\ - "[\s]+\-\-enableldapauth[\s]+" \ - "\-\-ldapserver=.*[\s]+\-\-ldapbasedn=.*" + advice_regex = ( + r"\#\!\/bin\/sh.*" + r"yum[\s]+install[\s]+\-y[\s]+curl[\s]+openssl[\s]+nss_ldap" + r"[\s]+authconfig.*authconfig[\s]+\-\-updateall" + r"[\s]+\-\-enableldap[\s]+\-\-enableldaptls" + r"[\s]+\-\-enableldapauth[\s]+" + r"\-\-ldapserver=.*[\s]+\-\-ldapbasedn=.*" + ) raiseerr = True run_advice(self.master, advice_id, advice_regex, raiseerr) @@ -103,12 +107,12 @@ class TestAdvice(IntegrationTest): def test_advice_RedHatNSSPAM(self): advice_id = 'config-redhat-nss-pam-ldapd' - advice_regex = "\#\!\/bin\/sh.*" \ - "yum[\s]+install[\s]+\-y[\s]+curl[\s]+openssl[\s]+" \ - "nss\-pam\-ldapd[\s]+pam_ldap[\s]+authconfig.*" \ - "authconfig[\s]+\-\-updateall[\s]+\-\-enableldap"\ - "[\s]+\-\-enableldaptls[\s]+\-\-enableldapauth[\s]+" \ - "\-\-ldapserver=.*[\s]+\-\-ldapbasedn=.*" + advice_regex = r"\#\!\/bin\/sh.*" \ + r"yum[\s]+install[\s]+\-y[\s]+curl[\s]+openssl[\s]+" \ + r"nss\-pam\-ldapd[\s]+pam_ldap[\s]+authconfig.*" \ + r"authconfig[\s]+\-\-updateall[\s]+\-\-enableldap"\ + r"[\s]+\-\-enableldaptls[\s]+\-\-enableldapauth[\s]+" \ + r"\-\-ldapserver=.*[\s]+\-\-ldapbasedn=.*" raiseerr = True run_advice(self.master, advice_id, advice_regex, raiseerr) @@ -116,9 +120,11 @@ class TestAdvice(IntegrationTest): def test_advice_RedHatSSSDBefore19(self): advice_id = 'config-redhat-sssd-before-1-9' - advice_regex = "\#\!\/bin\/sh.*" \ - "yum[\s]+install[\s]+\-y[\s]+sssd[\s]+authconfig[\s]+" \ - "curl[\s]+openssl.*service[\s]+sssd[\s]+start" + advice_regex = ( + r"\#\!\/bin\/sh.*" + r"yum[\s]+install[\s]+\-y[\s]+sssd[\s]+authconfig[\s]+" + r"curl[\s]+openssl.*service[\s]+sssd[\s]+start" + ) raiseerr = True run_advice(self.master, advice_id, advice_regex, raiseerr) |