Bläddra i källkod

Fix broken bootstrap action (#721).

Dan Helfman 1 år sedan
förälder
incheckning
18b3b569d0

+ 0 - 2
borgmatic/actions/config/bootstrap.py

@@ -43,7 +43,6 @@ def get_config_paths(bootstrap_arguments, global_arguments, local_borg_version):
         ),
         [borgmatic_manifest_path],
         {},
-        {},
         local_borg_version,
         global_arguments,
         extract_to_stdout=True,
@@ -95,7 +94,6 @@ def run_bootstrap(bootstrap_arguments, global_arguments, local_borg_version):
         ),
         [config_path.lstrip(os.path.sep) for config_path in manifest_config_paths],
         {},
-        {},
         local_borg_version,
         global_arguments,
         extract_to_stdout=False,

+ 8 - 1
tests/end-to-end/test_borgmatic.py

@@ -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)

+ 1 - 1
tests/end-to-end/test_override.py

@@ -21,7 +21,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)