Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: optionally disable config bootstrap #75

Merged
merged 4 commits into from
Jul 31, 2023

Conversation

diivi
Copy link
Collaborator

@diivi diivi commented Jul 31, 2023

@diivi
Copy link
Collaborator Author

diivi commented Jul 31, 2023

Nevermind, it still stored the config 🤔

Copy link
Collaborator

@witten witten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, but would you also mind adding some test coverage for this? It could be a very basic unit test that exercises the non-default code path. Thank you!

@witten
Copy link
Collaborator

witten commented Jul 31, 2023

Nevermind, it still stored the config

Huh, weird. This totally looks like it'd work. Maybe you're not using the latest archive when looking for the stored config?

@witten
Copy link
Collaborator

witten commented Jul 31, 2023

Oh, maybe this changeset only prevents storage of the manifest but doesn't change whether the actual config files get stored?

@diivi
Copy link
Collaborator Author

diivi commented Jul 31, 2023

Oh, maybe this changeset only prevents storage of the manifest but doesn't change whether the actual config files get stored?

Yup

Looks great, but would you also mind adding some test coverage for this? It could be a very basic unit test that exercises the non-default code path. Thank you!

On it!

@@ -646,6 +646,53 @@ def test_create_archive_with_sources_and_used_config_paths_calls_borg_with_sourc
global_arguments=flexmock(log_json=False, used_config_paths=['/etc/borgmatic/config.yaml']),
)

def test_create_archive_with_sources_and_used_config_paths_with_store_config_files_false_calls_borg_with_sources_and_no_config_paths():
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disclaimer: this is Copilot generated. I just took a glance (lines 691 and 677) and it made sense + it passed.

@witten
Copy link
Collaborator

witten commented Jul 31, 2023

The test looks fine to me (even though that function name makes even me blush), but what about a test for the manifest code path?

@diivi
Copy link
Collaborator Author

diivi commented Jul 31, 2023

Done!

@witten
Copy link
Collaborator

witten commented Jul 31, 2023

Awesome, thank you!

@witten witten merged commit 8491b2c into borgmatic-collective:main Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants