Initial pve cloud backup app

This commit is contained in:
Codex
2026-07-15 01:00:08 +02:00
commit 7a4c561f8e
37 changed files with 5495 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
from app import commands
from app.main import _validate_settings
def test_plain_onedrive_remote_is_accepted(monkeypatch):
monkeypatch.setattr(commands, "rclone_list_remotes", lambda rclone_path: ["onedrive"])
_validate_settings(
{
"setup_complete": True,
"proxmox_node": "pve",
"proxmox_storage": "hitachi",
"local_backup_dir": "/mnt/pve/hitachi/dump",
"rclone_path": "/usr/bin/rclone",
"rclone_remote": "onedrive",
"rclone_remote_path": "Backups/Proxmox",
"max_concurrent_backups": 1,
"timezone": "Europe/Berlin",
}
)
def test_invalid_timezone_is_rejected(monkeypatch):
monkeypatch.setattr(commands, "rclone_list_remotes", lambda rclone_path: ["onedrive"])
import pytest
from fastapi import HTTPException
with pytest.raises(HTTPException):
_validate_settings(
{
"setup_complete": True,
"proxmox_node": "pve",
"proxmox_storage": "hitachi",
"local_backup_dir": "/mnt/pve/hitachi/dump",
"rclone_path": "/usr/bin/rclone",
"rclone_remote": "onedrive",
"rclone_remote_path": "Backups/Proxmox",
"max_concurrent_backups": 1,
"timezone": "Not/AZone",
}
)