From 723e2bc1ad14687a8d6846b9ca73620e4e4090b1 Mon Sep 17 00:00:00 2001 From: Andrew Beresford Date: Thu, 2 Apr 2020 23:08:02 +0100 Subject: Add support for NFS/EFS mounts (#300) The cc_mounts module does not support NFS mounts in the form of hostname:/ or hostname:/path. This PR adds support for NFS-style paths in the fs_spec field. LP: #1870370 --- tests/unittests/test_handler/test_handler_mounts.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') diff --git a/tests/unittests/test_handler/test_handler_mounts.py b/tests/unittests/test_handler/test_handler_mounts.py index 05ac183e..35e72bd1 100644 --- a/tests/unittests/test_handler/test_handler_mounts.py +++ b/tests/unittests/test_handler/test_handler_mounts.py @@ -127,6 +127,12 @@ class TestSanitizeDevname(test_helpers.FilesystemMockingTestCase): cc_mounts.sanitize_devname( 'ephemeral0.1', lambda x: disk_path, mock.Mock())) + def test_network_device_returns_network_device(self): + disk_path = 'netdevice:/path' + self.assertEqual( + disk_path, + cc_mounts.sanitize_devname(disk_path, None, mock.Mock())) + class TestFstabHandling(test_helpers.FilesystemMockingTestCase): -- cgit v1.2.3