Skip to content

Commit

Permalink
tests: Check failover to secondary IP family
Browse files Browse the repository at this point in the history
Test that IPA server is still reachable when primary
address family is blocked but secondary is working.
  • Loading branch information
thalman committed Oct 18, 2024
1 parent 5f5077a commit 1184397
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion src/tests/system/tests/test_failover.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from sssd_test_framework.roles.ipa import IPA
from sssd_test_framework.roles.ldap import LDAP
from sssd_test_framework.roles.samba import Samba
from sssd_test_framework.topology import KnownTopologyGroup
from sssd_test_framework.topology import KnownTopologyGroup, KnownTopology


@pytest.mark.parametrize("value, expected", [(None, 31), (15, 31), (60, 60)])
Expand Down Expand Up @@ -80,3 +80,29 @@ def test_failover__reactivation_timeout_is_honored(
assert (
f"Primary server reactivation timeout set to {expected} seconds" in log
), f"'Primary server reactivation timeout set to {expected} seconds' not found in logs!"


@pytest.mark.importance("low")
@pytest.mark.topology(KnownTopology.IPA)
def test_failover__connect_second_family(client: Client, ipa: IPA):
"""
:title: Make sure that we can connect using secondary protocol
:setup:
1. Create user in IPA
2. Set family_order to "ipv6_first"
3. Set IPv6 address in /etc/hosts so it resolves but it
points to non-exesting machine
:steps:
1. Restart SSSD
2. Resolve user
:expectedresults:
1. SSSD goes online, user is resolved
:customerscenario: False
"""
user = "testuser"
ipa.user(user).add()
client.sssd.domain["lookup_family_order"] = "ipv6_first"
client.fs.append("%s cafe:cafe::3" % ipa.host.hostname)
client.sssd.start()
result = client.tools.id(user)
assert result is not None

0 comments on commit 1184397

Please sign in to comment.