From c51dd8096cf3673497b65e241060b849af57f5a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20V=C3=A1vra?= Date: Thu, 6 Feb 2025 14:22:02 +0100 Subject: [PATCH] tests: Move /exports to /var/exports We need to move the directory from read only root to make it work in RHEL Image Mode. --- src/tests/system/tests/test_autofs.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/tests/system/tests/test_autofs.py b/src/tests/system/tests/test_autofs.py index 7ce11874c7f..21d58965f86 100644 --- a/src/tests/system/tests/test_autofs.py +++ b/src/tests/system/tests/test_autofs.py @@ -31,18 +31,18 @@ def test_autofs__cache_first_set_to_true( 1. Create NFS export 2. Create auto.master map 3. Create auto.export map - 4. Add /export (auto.export) key to auto.master + 4. Add /var/export (auto.export) key to auto.master 5. Add "NFS export" key as "export" to auto.export 6. Enable autofs responder 7. Set [autofs]/cache_first = $cache_first 8. Start SSSD 9. Reload autofs daemon :steps: - 1. Access /export/export + 1. Access /var/export/export 2. Dump automount maps "automount -m" :expectedresults: 1. Directory can be accessed and it is correctly mounted to the NFS share - 2. /export contains auto.export map and "export" key + 2. /var/export contains auto.export map and "export" key :customerscenario: False """ nfs_export = nfs.export("export").add() @@ -60,7 +60,7 @@ def test_autofs__cache_first_set_to_true( client.automount.reload() # Check that we can mount the exported directory - assert client.automount.mount("/export/export", nfs_export), "Unable to mount /export/export!" + assert client.automount.mount("/var/export/export", nfs_export), "Unable to mount /var/export/export!" # Check that the maps are correctly fetched assert client.automount.dumpmaps() == { @@ -163,18 +163,18 @@ def test_autofs__works_with_some_offline_domains(client: Client, nfs: NFS, provi 1. Create NFS export 2. Create auto.master map 3. Create auto.export map - 4. Add /export (auto.export) key to auto.master + 4. Add /var/export (auto.export) key to auto.master 5. Add "NFS export" key as "export" to auto.export 6. Create two fake LDAP domains that will be offline (the provider is online) 7. Enable autofs responder 8. Start SSSD 9. Reload autofs daemon :steps: - 1. Access /export/export + 1. Access /var/export/export 2. Dump automount maps "automount -m" :expectedresults: 1. Directory can be accessed and it is correctly mounted to the NFS share - 2. /export contains auto.export map and "export" key + 2. /var/export contains auto.export map and "export" key :customerscenario: False """ @@ -182,7 +182,7 @@ def test_autofs__works_with_some_offline_domains(client: Client, nfs: NFS, provi nfs_export = nfs.export("export").add() auto_master = provider.automount.map("auto.master").add() auto_export = provider.automount.map("auto.export").add() - auto_master.key("/export").add(info=auto_export) + auto_master.key("/var/export").add(info=auto_export) key = auto_export.key("export").add(info=nfs_export) # Create fake domains, these will be offline @@ -207,9 +207,9 @@ def test_autofs__works_with_some_offline_domains(client: Client, nfs: NFS, provi client.automount.reload() # Check that we can mount the exported directory - assert client.automount.mount("/export/export", nfs_export), "Unable to mount /export/export!" + assert client.automount.mount("/var/export/export", nfs_export), "Unable to mount /var/export/export!" # Check that the maps are correctly fetched assert client.automount.dumpmaps() == { - "/export": {"map": "auto.export", "keys": [str(key)]}, + "/var/export": {"map": "auto.export", "keys": [str(key)]}, }, "Automount maps do not match!"