mirror of
https://github.com/borgbackup/borg.git
synced 2026-04-01 15:15:59 -04:00
Add test for error upon exporting a key to a directory
(cherry picked from commit d26264bb70)
This commit is contained in:
parent
891538ca7e
commit
96bd36d37a
1 changed files with 8 additions and 0 deletions
|
|
@ -2650,6 +2650,14 @@ class ArchiverTestCase(ArchiverTestCaseBase):
|
|||
assert export_contents.startswith('<!doctype html>')
|
||||
assert export_contents.endswith('</html>')
|
||||
|
||||
def test_key_export_directory(self):
|
||||
export_directory = self.output_path + '/exported'
|
||||
os.mkdir(export_directory)
|
||||
|
||||
self.cmd('init', self.repository_location, '--encryption', 'repokey')
|
||||
|
||||
self.cmd('key', 'export', self.repository_location, export_directory, exit_code=EXIT_ERROR)
|
||||
|
||||
def test_key_import_errors(self):
|
||||
export_file = self.output_path + '/exported'
|
||||
self.cmd('init', self.repository_location, '--encryption', 'keyfile')
|
||||
|
|
|
|||
Loading…
Reference in a new issue