diff options
author | Andrew Beresford <andrew.beresford@investbook.co.uk> | 2020-04-02 23:08:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-02 18:08:02 -0400 |
commit | 723e2bc1ad14687a8d6846b9ca73620e4e4090b1 (patch) | |
tree | e83718b8fa9ab06b4ff29487577ea0ef68d3ccc1 /tests/unittests/test_handler | |
parent | bec8f387252ac32e1fd7963cf871ceed8d313edd (diff) | |
download | vyos-cloud-init-723e2bc1ad14687a8d6846b9ca73620e4e4090b1.tar.gz vyos-cloud-init-723e2bc1ad14687a8d6846b9ca73620e4e4090b1.zip |
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
Diffstat (limited to 'tests/unittests/test_handler')
-rw-r--r-- | tests/unittests/test_handler/test_handler_mounts.py | 6 |
1 files changed, 6 insertions, 0 deletions
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): |