|
@@ -975,45 +975,23 @@ class ArchiverTestCase(ArchiverTestCaseBase):
|
|
|
|
|
|
@unittest.skipUnless(has_llfuse, 'llfuse not installed')
|
|
|
def test_fuse_mount_repository(self):
|
|
|
- mountpoint = os.path.join(self.tmpdir, 'mountpoint')
|
|
|
- os.mkdir(mountpoint)
|
|
|
self.cmd('init', self.repository_location)
|
|
|
self.create_test_files()
|
|
|
self.cmd('create', self.repository_location + '::archive', 'input')
|
|
|
self.cmd('create', self.repository_location + '::archive2', 'input')
|
|
|
- try:
|
|
|
- self.cmd('mount', self.repository_location, mountpoint, fork=True)
|
|
|
- self.wait_for_mount(mountpoint)
|
|
|
+ mountpoint = os.path.join(self.tmpdir, 'mountpoint')
|
|
|
+ with self.fuse_mount(self.repository_location, mountpoint):
|
|
|
self.assert_dirs_equal(self.input_path, os.path.join(mountpoint, 'archive', 'input'))
|
|
|
self.assert_dirs_equal(self.input_path, os.path.join(mountpoint, 'archive2', 'input'))
|
|
|
- finally:
|
|
|
- if sys.platform.startswith('linux'):
|
|
|
- os.system('fusermount -u ' + mountpoint)
|
|
|
- else:
|
|
|
- os.system('umount ' + mountpoint)
|
|
|
- os.rmdir(mountpoint)
|
|
|
- # Give the daemon some time to exit
|
|
|
- time.sleep(.2)
|
|
|
|
|
|
@unittest.skipUnless(has_llfuse, 'llfuse not installed')
|
|
|
def test_fuse_mount_archive(self):
|
|
|
- mountpoint = os.path.join(self.tmpdir, 'mountpoint')
|
|
|
- os.mkdir(mountpoint)
|
|
|
self.cmd('init', self.repository_location)
|
|
|
self.create_test_files()
|
|
|
self.cmd('create', self.repository_location + '::archive', 'input')
|
|
|
- try:
|
|
|
- self.cmd('mount', self.repository_location + '::archive', mountpoint, fork=True)
|
|
|
- self.wait_for_mount(mountpoint)
|
|
|
+ mountpoint = os.path.join(self.tmpdir, 'mountpoint')
|
|
|
+ with self.fuse_mount(self.repository_location + '::archive', mountpoint):
|
|
|
self.assert_dirs_equal(self.input_path, os.path.join(mountpoint, 'input'))
|
|
|
- finally:
|
|
|
- if sys.platform.startswith('linux'):
|
|
|
- os.system('fusermount -u ' + mountpoint)
|
|
|
- else:
|
|
|
- os.system('umount ' + mountpoint)
|
|
|
- os.rmdir(mountpoint)
|
|
|
- # Give the daemon some time to exit
|
|
|
- time.sleep(.2)
|
|
|
|
|
|
def verify_aes_counter_uniqueness(self, method):
|
|
|
seen = set() # Chunks already seen
|