From Fedora Project Wiki
(Created page with "{{QA/Test_Case |description=This test case ensures that the `autofs` service can successfully auto-mount specified file systems when accessed. |setup= 1. Ensure you have a Fedora system. 2. Install the `autofs` package: `sudo dnf install autofs`. 3. Ensure you have access to a network file share (e.g., an NFS share) for testing purposes. 4. Backup the existing autofs configuration: `sudo cp /etc/auto.master /etc/auto.master.backup`. |actions= # Open a terminal. # Start t...") |
No edit summary |
||
Line 2: | Line 2: | ||
|description=This test case ensures that the `autofs` service can successfully auto-mount specified file systems when accessed. | |description=This test case ensures that the `autofs` service can successfully auto-mount specified file systems when accessed. | ||
|setup= | |setup= | ||
# Ensure you have a Fedora system. | |||
# Install the `autofs` package: `sudo dnf install autofs`. | |||
# Ensure you have access to a network file share (e.g., an NFS share) for testing purposes. | |||
# Backup the existing autofs configuration: `sudo cp /etc/auto.master /etc/auto.master.backup`. | |||
|actions= | |actions= | ||
# Open a terminal. | # Open a terminal. | ||
Line 24: | Line 24: | ||
# After ceasing access and waiting for the timeout, the share should be auto-unmounted and not appear in the list of active mounts. | # After ceasing access and waiting for the timeout, the share should be auto-unmounted and not appear in the list of active mounts. | ||
|optional=For further testing: | |optional=For further testing: | ||
# Test with various file share types like NFS, CIFS, etc. | |||
# Experiment with different mount options in the map file. | |||
# Test the behavior when network connectivity is lost or when the file share becomes unavailable. | |||
# Restore the original autofs configuration: `sudo mv /etc/auto.master.backup /etc/auto.master` and reload the service. | |||
}} | }} | ||
[[Category:Package_autofs_test_cases]] | [[Category:Package_autofs_test_cases]] | ||
[[Category:Critical_path_test_cases]] | [[Category:Critical_path_test_cases]] |
Latest revision as of 18:46, 12 August 2023
Description
This test case ensures that the autofs
service can successfully auto-mount specified file systems when accessed.
Setup
- Ensure you have a Fedora system.
- Install the
autofs
package:sudo dnf install autofs
. - Ensure you have access to a network file share (e.g., an NFS share) for testing purposes.
- Backup the existing autofs configuration:
sudo cp /etc/auto.master /etc/auto.master.backup
.
How to test
- Open a terminal.
- Start the autofs service:
sudo systemctl start autofs
. - Ensure the service started without errors:
sudo systemctl status autofs
. - Edit the autofs master configuration (
/etc/auto.master
) to include your test mount point and map file. For example:/mnt/test /etc/auto.test
(This assumes an NFS share). - Create a map file (
/etc/auto.test
) with the details of your test share. Example for an NFS share:sharename -fstype=nfs,rw server:/path/to/share
. - Reload the autofs service:
sudo systemctl reload autofs
. - Access the test mount point:
ls /mnt/test/sharename
. - Check that the specified share is mounted: `mount
Expected Results
- The autofs service should start without any errors.
- The status command should indicate that the autofs service is actively running.
- After editing the configuration and accessing the specified mount point, the share should be automatically mounted.
- The
mount
command should confirm that the share is actively mounted. - After ceasing access and waiting for the timeout, the share should be auto-unmounted and not appear in the list of active mounts.
Optional
For further testing:
- Test with various file share types like NFS, CIFS, etc.
- Experiment with different mount options in the map file.
- Test the behavior when network connectivity is lost or when the file share becomes unavailable.
- Restore the original autofs configuration:
sudo mv /etc/auto.master.backup /etc/auto.master
and reload the service.