From cd8e9ce173303e192e848e4973aaf2c7bd31ee0a Mon Sep 17 00:00:00 2001 From: Florence Blanc-Renaud Date: Thu, 13 Jan 2022 14:38:27 +0100 Subject: [PATCH] ipatests: fix expected automount config in nsswitch.conf The test TestIpaClientAutomountFileRestore expects a specific order for the automount sources to query in /etc/nsswitch.conf. With authselect update 1.3.0, the databases are sorted in order of likelihood and the following line in seen: automount: files sss instead of automount: sss files Since the test doesn't care about the order but rather about the list of sources, ignore the order. Fixes: https://pagure.io/freeipa/issue/9067 Signed-off-by: Florence Blanc-Renaud Reviewed-By: Rob Crittenden --- ipatests/test_integration/test_nfs.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ipatests/test_integration/test_nfs.py b/ipatests/test_integration/test_nfs.py index dc53a6da9..9109a72db 100644 --- a/ipatests/test_integration/test_nfs.py +++ b/ipatests/test_integration/test_nfs.py @@ -323,7 +323,9 @@ class TestIpaClientAutomountFileRestore(IntegrationTest): if no_sssd: assert after_ipa_client_automount == ['files', 'ldap'] else: - assert after_ipa_client_automount == ['sss', 'files'] + # The default order depends on the authselect version + # but we only care about the list of sources, not their order + assert sorted(after_ipa_client_automount) == ['files', 'sss'] cmd = self.clients[0].run_command(grep_automount_command) assert cmd.stdout_text.split() == after_ipa_client_automount