mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-01-05 23:54:19 +00:00
test(backups): implement get_folders() for bitwarden
This commit is contained in:
parent
48359ffd20
commit
378f0ebd73
|
@ -113,10 +113,14 @@ class Bitwarden(Service):
|
|||
@staticmethod
|
||||
def get_storage_usage() -> int:
|
||||
storage_usage = 0
|
||||
storage_usage += get_storage_usage("/var/lib/bitwarden")
|
||||
storage_usage += get_storage_usage("/var/lib/bitwarden_rs")
|
||||
for folder in Bitwarden.get_folders():
|
||||
storage_usage += get_storage_usage(folder)
|
||||
return storage_usage
|
||||
|
||||
@staticmethod
|
||||
def get_folders() -> typing.List[str]:
|
||||
return ["/var/lib/bitwarden", "/var/lib/bitwarden_rs"]
|
||||
|
||||
@staticmethod
|
||||
def get_drive() -> str:
|
||||
with ReadUserData() as user_data:
|
||||
|
@ -157,16 +161,11 @@ class Bitwarden(Service):
|
|||
[
|
||||
FolderMoveNames(
|
||||
name="bitwarden",
|
||||
bind_location="/var/lib/bitwarden",
|
||||
bind_location=folder,
|
||||
group="vaultwarden",
|
||||
owner="vaultwarden",
|
||||
),
|
||||
FolderMoveNames(
|
||||
name="bitwarden_rs",
|
||||
bind_location="/var/lib/bitwarden_rs",
|
||||
group="vaultwarden",
|
||||
owner="vaultwarden",
|
||||
),
|
||||
)
|
||||
for folder in Bitwarden.get_folders()
|
||||
],
|
||||
"bitwarden",
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue