|
@@ -22,14 +22,14 @@ def test_prosody_tls_files(host):
|
|
|
assert tls_file.user == 'root'
|
|
|
assert tls_file.group == 'prosody'
|
|
|
assert tls_file.mode == 0o640
|
|
|
assert tls_file.content == open("tests/data/x509/%s.domain1_xmpp.key" % hostname, "r").read().rstrip()
|
|
|
assert tls_file.content_string == open("tests/data/x509/%s.domain1_xmpp.key" % hostname, "r").read().rstrip()
|
|
|
|
|
|
tls_file = host.file('/etc/ssl/certs/%s.domain1_xmpp.pem' % hostname)
|
|
|
assert tls_file.is_file
|
|
|
assert tls_file.user == 'root'
|
|
|
assert tls_file.group == 'root'
|
|
|
assert tls_file.mode == 0o644
|
|
|
assert tls_file.content == open("tests/data/x509/%s.domain1_xmpp.pem" % hostname, "r").read().rstrip()
|
|
|
assert tls_file.content_string == open("tests/data/x509/%s.domain1_xmpp.pem" % hostname, "r").read().rstrip()
|
|
|
|
|
|
|
|
|
def test_certificate_validity_check_configuration(host):
|
|
@@ -45,7 +45,7 @@ def test_certificate_validity_check_configuration(host):
|
|
|
assert config.user == 'root'
|
|
|
assert config.group == 'root'
|
|
|
assert config.mode == 0o644
|
|
|
assert config.content == "/etc/ssl/certs/%s.domain1_xmpp.pem" % hostname
|
|
|
assert config.content_string == "/etc/ssl/certs/%s.domain1_xmpp.pem" % hostname
|
|
|
|
|
|
|
|
|
def test_prosody_configuration_file_content(host):
|
|
@@ -59,20 +59,20 @@ def test_prosody_configuration_file_content(host):
|
|
|
|
|
|
config = host.file('/etc/prosody/prosody.cfg.lua')
|
|
|
|
|
|
assert "admins = { \"john.doe@domain1\", }" in config.content
|
|
|
assert "key = \"/etc/ssl/private/%s.domain1_xmpp.key\";" % hostname in config.content
|
|
|
assert "certificate = \"/etc/ssl/certs/%s.domain1_xmpp.pem\";" % hostname in config.content
|
|
|
assert "ldap_server = \"ldap-server\"" in config.content
|
|
|
assert "ldap_rootdn = \"cn=prosody,ou=services,dc=local\"" in config.content
|
|
|
assert "ldap_password = \"prosodypassword\"" in config.content
|
|
|
assert "ldap_filter = \"(&(mail=$user@$host)(memberOf=cn=xmpp,ou=groups,dc=local))\"" in config.content
|
|
|
assert "ldap_base = \"ou=people,dc=local\"" in config.content
|
|
|
assert "admins = { \"john.doe@domain1\", }" in config.content_string
|
|
|
assert "key = \"/etc/ssl/private/%s.domain1_xmpp.key\";" % hostname in config.content_string
|
|
|
assert "certificate = \"/etc/ssl/certs/%s.domain1_xmpp.pem\";" % hostname in config.content_string
|
|
|
assert "ldap_server = \"ldap-server\"" in config.content_string
|
|
|
assert "ldap_rootdn = \"cn=prosody,ou=services,dc=local\"" in config.content_string
|
|
|
assert "ldap_password = \"prosodypassword\"" in config.content_string
|
|
|
assert "ldap_filter = \"(&(mail=$user@$host)(memberOf=cn=xmpp,ou=groups,dc=local))\"" in config.content_string
|
|
|
assert "ldap_base = \"ou=people,dc=local\"" in config.content_string
|
|
|
|
|
|
assert """VirtualHost "domain1"
|
|
|
Component "conference.domain1" "muc"
|
|
|
restrict_room_creation = "local"
|
|
|
Component "proxy.domain1" "proxy65"
|
|
|
proxy65_acl = { "domain1" }""" in config.content
|
|
|
proxy65_acl = { "domain1" }""" in config.content_string
|
|
|
|
|
|
|
|
|
def test_correct_prosody_package_installed(host):
|