diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/samba/tests/smb3unix.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/python/samba/tests/smb3unix.py b/python/samba/tests/smb3unix.py index d8e8783670a..302b34776d7 100644 --- a/python/samba/tests/smb3unix.py +++ b/python/samba/tests/smb3unix.py @@ -490,3 +490,23 @@ class Smb3UnixTests(samba.tests.libsmb.LibsmbTests): l = winconn.list('', mask='test_delete_on_close') found_files = {get_string(f['name']): f for f in l} self.assertFalse('test_delete_on_close' in found_files) + + def test_posix_fs_info(self): + """ + Test the posix filesystem attributes list given by cli_get_posix_fs_info. + With a non-posix connection, a NT_STATUS_INVALID_INFO_CLASS error + is expected. + """ + (winconn, posixconn) = self.connections() + + try: + posix_info = posixconn.get_posix_fs_info() + except Exception as e: + self.fail(str(e)) + self.assertTrue(isinstance(posix_info, dict)) + self.assertTrue('optimal_transfer_size' in posix_info) + + with self.assertRaises(NTSTATUSError) as cm: + winconn.get_posix_fs_info() + e = cm.exception + self.assertEqual(e.args[0], ntstatus.NT_STATUS_INVALID_INFO_CLASS) |
