mirror of
https://github.com/ZettaIO/restic-compose-backup.git
synced 2025-09-29 07:05:24 +00:00
Make config check skippable for tests
This commit is contained in:
@@ -2,10 +2,12 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
class Config:
|
class Config:
|
||||||
def __init__(self):
|
def __init__(self, check=True):
|
||||||
self.repository = os.environ['RESTIC_REPOSITORY']
|
self.repository = os.environ['RESTIC_REPOSITORY']
|
||||||
self.password = os.environ['RESTIC_PASSWORD']
|
self.password = os.environ['RESTIC_PASSWORD']
|
||||||
self.docker_base_url = os.environ.get('DOCKER_BASE_URL') or "unix://tmp/docker.sock"
|
self.docker_base_url = os.environ.get('DOCKER_BASE_URL') or "unix://tmp/docker.sock"
|
||||||
|
|
||||||
|
if check:
|
||||||
self.check()
|
self.check()
|
||||||
|
|
||||||
def check(self):
|
def check(self):
|
||||||
|
Reference in New Issue
Block a user