mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-29 15:31:28 +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
|
@staticmethod
|
||||||
def get_storage_usage() -> int:
|
def get_storage_usage() -> int:
|
||||||
storage_usage = 0
|
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
|
return storage_usage
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def get_folders() -> typing.List[str]:
|
||||||
|
return ["/var/lib/gitea"]
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_drive() -> str:
|
def get_drive() -> str:
|
||||||
with ReadUserData() as user_data:
|
with ReadUserData() as user_data:
|
||||||
|
@ -154,10 +159,11 @@ class Gitea(Service):
|
||||||
[
|
[
|
||||||
FolderMoveNames(
|
FolderMoveNames(
|
||||||
name="gitea",
|
name="gitea",
|
||||||
bind_location="/var/lib/gitea",
|
bind_location=folder,
|
||||||
group="gitea",
|
group="gitea",
|
||||||
owner="gitea",
|
owner="gitea",
|
||||||
),
|
)
|
||||||
|
for folder in Gitea.get_folders()
|
||||||
],
|
],
|
||||||
"gitea",
|
"gitea",
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue