mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-09-13 18:46:17 +05:00
Point orphan recovery hint to update
This commit is contained in:
parent
08e998f7d1
commit
87e8c8aef5
@ -115,7 +115,7 @@ def status(out_dir: Path = CONSTANTS.DATA_DIR) -> None:
|
||||
|
||||
if orphaned_dirs:
|
||||
print(" [violet]Hint:[/violet] To automatically import orphaned data directories into the main index, run:")
|
||||
print(" [green]archivebox init[/green]")
|
||||
print(" [green]archivebox update[/green]")
|
||||
|
||||
print()
|
||||
print("[green]\\[*] Scanning recent archive changes and user logins:[/green]")
|
||||
|
||||
@ -98,12 +98,13 @@ def test_status_detects_orphaned_directories(initialized_archive):
|
||||
_create_snapshot_rows(initialized_archive, env, "https://example.com")
|
||||
|
||||
# Create an orphaned directory
|
||||
(initialized_archive / "archive" / "fake_orphaned_dir").mkdir(parents=True, exist_ok=True)
|
||||
(initialized_archive / "archive" / "1234567890").mkdir(parents=True, exist_ok=True)
|
||||
|
||||
result = run_archivebox_cmd(["status"], cwd=initialized_archive)
|
||||
|
||||
# Should mention orphaned dirs
|
||||
assert "orphan" in result.stdout.lower() or "1" in result.stdout
|
||||
assert "orphan" in result.stdout.lower()
|
||||
assert "archivebox update" in result.stdout
|
||||
|
||||
|
||||
def test_status_counts_new_snapshot_output_dirs_as_archived(initialized_archive):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user