Skip to content

Commit 0174fd5

Browse files
tests: Move /exports to /var/exports for autofs tests
We need to move the directory from read only root to make it work in RHEL Image Mode.
1 parent 00dab40 commit 0174fd5

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/tests/system/tests/test_autofs.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,24 @@ def test_autofs__cache_first_set_to_true(
3131
1. Create NFS export
3232
2. Create auto.master map
3333
3. Create auto.export map
34-
4. Add /export (auto.export) key to auto.master
34+
4. Add /var/export (auto.export) key to auto.master
3535
5. Add "NFS export" key as "export" to auto.export
3636
6. Enable autofs responder
3737
7. Set [autofs]/cache_first = $cache_first
3838
8. Start SSSD
3939
9. Reload autofs daemon
4040
:steps:
41-
1. Access /export/export
41+
1. Access /var/export/export
4242
2. Dump automount maps "automount -m"
4343
:expectedresults:
4444
1. Directory can be accessed and it is correctly mounted to the NFS share
45-
2. /export contains auto.export map and "export" key
45+
2. /var/export contains auto.export map and "export" key
4646
:customerscenario: False
4747
"""
4848
nfs_export = nfs.export("export").add()
4949
auto_master = provider.automount.map("auto.master").add()
5050
auto_export = provider.automount.map("auto.export").add()
51-
auto_master.key("/export").add(info=auto_export)
51+
auto_master.key("/var/export").add(info=auto_export)
5252
key = auto_export.key("export").add(info=nfs_export)
5353

5454
# Start SSSD
@@ -60,11 +60,11 @@ def test_autofs__cache_first_set_to_true(
6060
client.automount.reload()
6161

6262
# Check that we can mount the exported directory
63-
assert client.automount.mount("/export/export", nfs_export), "Unable to mount /export/export!"
63+
assert client.automount.mount("/var/export/export", nfs_export), "Unable to mount /var/export/export!"
6464

6565
# Check that the maps are correctly fetched
6666
assert client.automount.dumpmaps() == {
67-
"/export": {"map": "auto.export", "keys": [str(key)]},
67+
"/var/export": {"map": "auto.export", "keys": [str(key)]},
6868
}, "Automount maps do not match!"
6969

7070

@@ -163,26 +163,26 @@ def test_autofs__works_with_some_offline_domains(client: Client, nfs: NFS, provi
163163
1. Create NFS export
164164
2. Create auto.master map
165165
3. Create auto.export map
166-
4. Add /export (auto.export) key to auto.master
166+
4. Add /var/export (auto.export) key to auto.master
167167
5. Add "NFS export" key as "export" to auto.export
168168
6. Create two fake LDAP domains that will be offline (the provider is online)
169169
7. Enable autofs responder
170170
8. Start SSSD
171171
9. Reload autofs daemon
172172
:steps:
173-
1. Access /export/export
173+
1. Access /var/export/export
174174
2. Dump automount maps "automount -m"
175175
:expectedresults:
176176
1. Directory can be accessed and it is correctly mounted to the NFS share
177-
2. /export contains auto.export map and "export" key
177+
2. /var/export contains auto.export map and "export" key
178178
:customerscenario: False
179179
"""
180180

181181
# Create autofs maps
182182
nfs_export = nfs.export("export").add()
183183
auto_master = provider.automount.map("auto.master").add()
184184
auto_export = provider.automount.map("auto.export").add()
185-
auto_master.key("/export").add(info=auto_export)
185+
auto_master.key("/var/export").add(info=auto_export)
186186
key = auto_export.key("export").add(info=nfs_export)
187187

188188
# Create fake domains, these will be offline
@@ -207,9 +207,9 @@ def test_autofs__works_with_some_offline_domains(client: Client, nfs: NFS, provi
207207
client.automount.reload()
208208

209209
# Check that we can mount the exported directory
210-
assert client.automount.mount("/export/export", nfs_export), "Unable to mount /export/export!"
210+
assert client.automount.mount("/var/export/export", nfs_export), "Unable to mount /var/export/export!"
211211

212212
# Check that the maps are correctly fetched
213213
assert client.automount.dumpmaps() == {
214-
"/export": {"map": "auto.export", "keys": [str(key)]},
214+
"/var/export": {"map": "auto.export", "keys": [str(key)]},
215215
}, "Automount maps do not match!"

0 commit comments

Comments
 (0)