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=
1. Ensure you have a Fedora system.
# Ensure you have a Fedora system.
2. Install the `autofs` package: `sudo dnf install autofs`.
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.
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`.
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:
1. Test with various file share types like NFS, CIFS, etc.
Test with various file share types like NFS, CIFS, etc.
2. Experiment with different mount options in the map file.
# Experiment with different mount options in the map file.
3. Test the behavior when network connectivity is lost or when the file share becomes unavailable.
# Test the behavior when network connectivity is lost or when the file share becomes unavailable.
4. Restore the original autofs configuration: `sudo mv /etc/auto.master.backup /etc/auto.master` and reload the service.
# 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

  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.

How to test

  1. Open a terminal.
  2. Start the autofs service: sudo systemctl start autofs.
  3. Ensure the service started without errors: sudo systemctl status autofs.
  4. 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).
  5. 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.
  6. Reload the autofs service: sudo systemctl reload autofs.
  7. Access the test mount point: ls /mnt/test/sharename.
  8. Check that the specified share is mounted: `mount

Expected Results

  1. The autofs service should start without any errors.
  2. The status command should indicate that the autofs service is actively running.
  3. After editing the configuration and accessing the specified mount point, the share should be automatically mounted.
  4. The mount command should confirm that the share is actively mounted.
  5. 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:

  1. Test with various file share types like NFS, CIFS, etc.
  2. Experiment with different mount options in the map file.
  3. Test the behavior when network connectivity is lost or when the file share becomes unavailable.
  4. Restore the original autofs configuration: sudo mv /etc/auto.master.backup /etc/auto.master and reload the service.