|
@@ -22,7 +22,7 @@ def generate_configuration(config_path, repository_path):
|
|
|
.replace('- /home', f'- {config_path}')
|
|
|
.replace('- /etc', '')
|
|
|
.replace('- /var/log/syslog*', '')
|
|
|
- + 'storage:\n encryption_passphrase: "test"'
|
|
|
+ + 'encryption_passphrase: "test"'
|
|
|
)
|
|
|
config_file = open(config_path, 'w')
|
|
|
config_file.write(config)
|
|
@@ -74,6 +74,13 @@ def test_borgmatic_command():
|
|
|
|
|
|
assert len(parsed_output) == 1
|
|
|
assert 'repository' in parsed_output[0]
|
|
|
+
|
|
|
+ # Exercise the bootstrap action.
|
|
|
+ output = subprocess.check_output(
|
|
|
+ f'borgmatic --config {config_path} bootstrap --repository {repository_path}'.split(' '),
|
|
|
+ ).decode(sys.stdout.encoding)
|
|
|
+
|
|
|
+ assert 'successful' in output
|
|
|
finally:
|
|
|
os.chdir(original_working_directory)
|
|
|
shutil.rmtree(temporary_directory)
|