mirror of
https://github.com/kevinveenbirkenbach/docker-volume-backup.git
synced 2025-12-29 03:42:08 +00:00
fix(backup): log missing db config instead of raising
- Use module logger in backup/db.py - Skip db dump when no databases.csv entry is present - Apply black/formatting cleanup across backup/restore/tests https://chatgpt.com/share/69519d45-b0dc-800f-acb6-6fb8504e9b46
This commit is contained in:
@@ -6,7 +6,9 @@ from baudolo.backup.app import requires_stop
|
||||
|
||||
class TestRequiresStop(unittest.TestCase):
|
||||
@patch("baudolo.backup.app.get_image_info")
|
||||
def test_requires_stop_false_when_all_images_are_whitelisted(self, mock_get_image_info):
|
||||
def test_requires_stop_false_when_all_images_are_whitelisted(
|
||||
self, mock_get_image_info
|
||||
):
|
||||
# All containers use images containing allowed substrings
|
||||
mock_get_image_info.side_effect = [
|
||||
"repo/mastodon:v4",
|
||||
@@ -17,7 +19,9 @@ class TestRequiresStop(unittest.TestCase):
|
||||
self.assertFalse(requires_stop(containers, whitelist))
|
||||
|
||||
@patch("baudolo.backup.app.get_image_info")
|
||||
def test_requires_stop_true_when_any_image_is_not_whitelisted(self, mock_get_image_info):
|
||||
def test_requires_stop_true_when_any_image_is_not_whitelisted(
|
||||
self, mock_get_image_info
|
||||
):
|
||||
mock_get_image_info.side_effect = [
|
||||
"repo/mastodon:v4",
|
||||
"repo/nginx:latest",
|
||||
|
||||
Reference in New Issue
Block a user