test(backups): implement get_folders() for gitea

This commit is contained in:
Houkime 2023-04-17 12:48:11 +00:00
parent 378f0ebd73
commit 1c0e3f0f92

View file

@ -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",
)