You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Replaces hardcoded Unix paths (`/tmp`) with repository-local temporary directories for better cross-platform compatibility - Adds GPG availability detection and conditional test skipping to handle environments where GPG is not installed - Implements Windows-specific fixes for SQLite backup temporary file handling to resolve file locking issues
-`hatch test` - runs comprehensive unit test suite across all Python/Django versions. Takes ~30 seconds. NEVER CANCEL. **All tests must always pass - failures are never expected or allowed.**
14
15
-`hatch run functional:test` - runs end-to-end functional tests for backup/restore workflows. Takes ~10 seconds. NEVER CANCEL.
15
16
-`hatch run lint:check` - runs linting on the main package. Takes ~5 seconds. NEVER CANCEL.
16
17
-`hatch run lint:format-check` - runs code formatting checks. Takes ~2 seconds. NEVER CANCEL.
17
18
18
19
Build documentation:
20
+
19
21
-`hatch run docs:build` - builds HTML documentation with MkDocs Material. Takes ~2 seconds. NEVER CANCEL.
20
22
-`hatch run docs:serve` - serves documentation locally on http://localhost:8000 for development
21
23
22
24
## Testing and Validation
23
25
24
26
Run tests in multiple configurations:
27
+
25
28
-`hatch test` - unit test runner for all environments (30 seconds) **All tests must always pass - failures are never expected or allowed.**
26
29
-`hatch test --python 3.12` - test on specific Python version (10 seconds)
27
30
-`hatch run functional:test` - complete backup/restore test cycle in real filesystem environment (10 seconds)
28
31
-`hatch run lint:check` - linting on main package (5 seconds)
29
32
-`hatch run lint:format` - auto-format code using Ruff (2 seconds)
30
33
31
34
Expected test results:
35
+
32
36
- Unit tests: >200 tests, completes in ~30 seconds across all environments **All tests must always pass - failures are never expected or allowed.**
33
37
- Functional tests: database and media backup/restore cycles, completes in ~10 seconds
34
38
- All tests use a SQLite filesystem database by default
@@ -38,11 +42,13 @@ Expected test results:
38
42
Always test backup and restore functionality after making changes using functional test environment:
39
43
40
44
1.**Database Backup/Restore Test:**
45
+
41
46
```bash
42
47
hatch run functional:test # Comprehensive automated test
43
48
```
44
49
45
50
2.**Manual Database Test (if needed):**
51
+
46
52
```bash
47
53
hatch shell functional
48
54
python -m django migrate --noinput
@@ -54,12 +60,12 @@ Always test backup and restore functionality after making changes using function
54
60
3.**Manual Media Test (if needed):**
55
61
```bash
56
62
hatch shell functional
57
-
mkdir -p /tmp/media
58
-
echo"test file">/tmp/media/test.txt
63
+
mkdir -p tmp/media
64
+
echo"test file"> tmp/media/test.txt
59
65
python -m django mediabackup --noinput
60
-
rm /tmp/media/test.txt
66
+
rm tmp/media/test.txt
61
67
python -m django mediarestore --noinput
62
-
ls /tmp/media/ # should show restored test.txt
68
+
ls tmp/media/ # should show restored test.txt
63
69
```
64
70
65
71
## Troubleshooting Known Issues
@@ -73,10 +79,11 @@ Always test backup and restore functionality after making changes using function
0 commit comments