mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ipatests/test_integration/test_replica_promotion.py: Configure firewall
The tests in this file are calling ipa-[server,replica]-install directly instead of using methods from tasks. Therefore it is required to enable or disable the needed firewall services also. Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Armando Neto <abiagion@redhat.com>
This commit is contained in:
@@ -12,6 +12,7 @@ from ipatests.test_integration.base import IntegrationTest
|
|||||||
from ipatests.pytest_ipa.integration import tasks
|
from ipatests.pytest_ipa.integration import tasks
|
||||||
from ipatests.pytest_ipa.integration.tasks import (
|
from ipatests.pytest_ipa.integration.tasks import (
|
||||||
assert_error, replicas_cleanup)
|
assert_error, replicas_cleanup)
|
||||||
|
from ipatests.pytest_ipa.integration.firewall import Firewall
|
||||||
from ipatests.pytest_ipa.integration.env_config import get_global_config
|
from ipatests.pytest_ipa.integration.env_config import get_global_config
|
||||||
from ipalib.constants import (
|
from ipalib.constants import (
|
||||||
DOMAIN_LEVEL_1, IPA_CA_NICKNAME)
|
DOMAIN_LEVEL_1, IPA_CA_NICKNAME)
|
||||||
@@ -68,6 +69,8 @@ class TestReplicaPromotionLevel1(ReplicaPromotionBase):
|
|||||||
raiseonerr=False)
|
raiseonerr=False)
|
||||||
assert result.returncode == 1
|
assert result.returncode == 1
|
||||||
assert expected_err in result.stderr_text
|
assert expected_err in result.stderr_text
|
||||||
|
Firewall(self.replicas[0]).enable_services(["freeipa-ldap",
|
||||||
|
"freeipa-ldaps"])
|
||||||
|
|
||||||
@replicas_cleanup
|
@replicas_cleanup
|
||||||
def test_one_command_installation(self):
|
def test_one_command_installation(self):
|
||||||
@@ -82,6 +85,8 @@ class TestReplicaPromotionLevel1(ReplicaPromotionBase):
|
|||||||
'-r', self.master.domain.realm,
|
'-r', self.master.domain.realm,
|
||||||
'--server', self.master.hostname,
|
'--server', self.master.hostname,
|
||||||
'-U'])
|
'-U'])
|
||||||
|
Firewall(self.replicas[0]).enable_services(["freeipa-ldap",
|
||||||
|
"freeipa-ldaps"])
|
||||||
# Ensure that pkinit is properly configured, test for 7566
|
# Ensure that pkinit is properly configured, test for 7566
|
||||||
result = self.replicas[0].run_command(['ipa-pkinit-manage', 'status'])
|
result = self.replicas[0].run_command(['ipa-pkinit-manage', 'status'])
|
||||||
assert "PKINIT is enabled" in result.stdout_text
|
assert "PKINIT is enabled" in result.stdout_text
|
||||||
@@ -150,6 +155,8 @@ class TestUnprivilegedUserPermissions(IntegrationTest):
|
|||||||
'-n', self.master.domain.name,
|
'-n', self.master.domain.name,
|
||||||
'-r', self.master.domain.realm,
|
'-r', self.master.domain.realm,
|
||||||
'-U'])
|
'-U'])
|
||||||
|
Firewall(self.replicas[0]).enable_services(["freeipa-ldap",
|
||||||
|
"freeipa-ldaps"])
|
||||||
|
|
||||||
|
|
||||||
class TestProhibitReplicaUninstallation(IntegrationTest):
|
class TestProhibitReplicaUninstallation(IntegrationTest):
|
||||||
@@ -170,6 +177,8 @@ class TestProhibitReplicaUninstallation(IntegrationTest):
|
|||||||
" topology" % self.replicas[0].hostname, 1)
|
" topology" % self.replicas[0].hostname, 1)
|
||||||
self.replicas[0].run_command(['ipa-server-install', '--uninstall',
|
self.replicas[0].run_command(['ipa-server-install', '--uninstall',
|
||||||
'-U', '--ignore-topology-disconnect'])
|
'-U', '--ignore-topology-disconnect'])
|
||||||
|
Firewall(self.replicas[0]).disable_services(["freeipa-ldap",
|
||||||
|
"freeipa-ldaps"])
|
||||||
|
|
||||||
|
|
||||||
class TestWrongClientDomain(IntegrationTest):
|
class TestWrongClientDomain(IntegrationTest):
|
||||||
|
|||||||
Reference in New Issue
Block a user