forked from retoor/devplacepy
Render markdown in gist and project sidebar titles; add content visibility and GIF picker
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -56,3 +56,18 @@ def test_is_auth_error_detects_rclone_html_401():
|
||||
)
|
||||
assert offload._is_auth_error("didn't find section in config file")
|
||||
assert not offload._is_auth_error("connection timed out")
|
||||
|
||||
|
||||
def test_run_cycle_skips_clearly_when_rclone_binary_missing(monkeypatch):
|
||||
monkeypatch.setattr(offload.config, "RCLONE_BIN", "/nonexistent/rclone-test-binary")
|
||||
|
||||
async def explode(*args, **kwargs):
|
||||
raise AssertionError("rclone must not be spawned when the binary is missing")
|
||||
|
||||
monkeypatch.setattr(offload, "_run_rclone", explode)
|
||||
logs = []
|
||||
result = run_async(offload.run_cycle(keep_local=5, keep_remote=5, log=logs.append))
|
||||
assert result == {"uploaded": 0, "purged_local": 0, "removed_remote": 0}
|
||||
assert len(logs) == 1
|
||||
assert "rclone binary not found" in logs[0]
|
||||
assert "backup_offload_enabled" in logs[0]
|
||||
|
||||
Reference in New Issue
Block a user