Add test for error upon exporting a key to a directory

This commit is contained in:
Milkey Mouse 2019-02-19 23:59:14 -08:00
parent 72ebd13e6f
commit d26264bb70
No known key found for this signature in database
GPG Key ID: C6EF5A02F5647987
1 changed files with 8 additions and 0 deletions

View File

@ -2639,6 +2639,14 @@ class ArchiverTestCase(ArchiverTestCaseBase):
assert export_contents.startswith('<!doctype html>') assert export_contents.startswith('<!doctype html>')
assert export_contents.endswith('</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): def test_key_import_errors(self):
export_file = self.output_path + '/exported' export_file = self.output_path + '/exported'
self.cmd('init', self.repository_location, '--encryption', 'keyfile') self.cmd('init', self.repository_location, '--encryption', 'keyfile')