mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-26 05:51:29 +00:00
test(backups): implement get_folders() for gitea
This commit is contained in:
parent
378f0ebd73
commit
1c0e3f0f92
|
@ -112,9 +112,14 @@ class Gitea(Service):
|
|||
@staticmethod
|
||||
def get_storage_usage() -> int:
|
||||
storage_usage = 0
|
||||
storage_usage += get_storage_usage("/var/lib/gitea")
|
||||
for folder in Gitea.get_folders():
|
||||
storage_usage += get_storage_usage()
|
||||
return storage_usage
|
||||
|
||||
@staticmethod
|
||||
def get_folders() -> typing.List[str]:
|
||||
return ["/var/lib/gitea"]
|
||||
|
||||
@staticmethod
|
||||
def get_drive() -> str:
|
||||
with ReadUserData() as user_data:
|
||||
|
@ -154,10 +159,11 @@ class Gitea(Service):
|
|||
[
|
||||
FolderMoveNames(
|
||||
name="gitea",
|
||||
bind_location="/var/lib/gitea",
|
||||
bind_location=folder,
|
||||
group="gitea",
|
||||
owner="gitea",
|
||||
),
|
||||
)
|
||||
for folder in Gitea.get_folders()
|
||||
],
|
||||
"gitea",
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue