4.0 KiB
4.0 KiB
Milestone 2 Integration Test Checklist
Test Environment Setup
- Location:
/home/dubey/projects/onyx-test/ccr-milestone-2-test
- Goal: Verify transparent versioning, daemon, save, and undo functionality
Test Steps & Verification Criteria
Step 1: Repository Initialization
Action: Initialize Onyx repository in test folder Expected Result:
- ✅
onx init
succeeds without errors - ✅
.git/
directory created - ✅
.onx/
directory created - ✅
.onx/workstreams.json
exists with{"workstreams":[]}
- ✅
.onx/oplog
file exists (empty) - ✅ Command returns success message
Step 2: Daemon Startup
Action: Start Onyx daemon Expected Result:
- ✅
onx daemon start
succeeds without errors - ✅
onx daemon status
shows daemon is running - ✅
.onx/daemon.pid
file created with process ID - ✅ Daemon process is running in background
- ✅ No daemon startup errors in logs
Step 3: Create Initial File
Action: Create main.py
with print statement
Expected Result:
- ✅ File creation succeeds
- ✅ File exists with correct content:
print("hello world")
- ✅ Daemon detects file change (check logs if available)
- ✅
.onx/workspace
file updated (after debounce period) - ✅
refs/onyx/workspaces/current
reference exists
Step 4: Wait for Automatic Snapshot
Action: Wait 3 seconds for debouncing and snapshot creation Expected Result:
- ✅ Daemon processes filesystem events
- ✅ Workspace state file updated with new commit SHA
- ✅ Ephemeral commit created in Git repository
Step 5: Save Command Test
Action: Execute onx save -m "Add hello world program"
Expected Result:
- ✅ Save command succeeds without errors
- ✅ Success message displayed
- ✅ Workstreams.json updated with new commit
- ✅ New branch reference created (
refs/onyx/workstreams/{name}/commit-1
) - ✅ Oplog entry created for save operation
Step 6: Modify File
Action: Add print("goodbye")
to main.py
Expected Result:
- ✅ File modification succeeds
- ✅ New content: both print statements
- ✅ Daemon detects file change
- ✅ Workspace state updated with new ephemeral commit
Step 7: Wait for Second Snapshot
Action: Wait 3 seconds for debouncing Expected Result:
- ✅ Second automatic snapshot created
- ✅ Workspace state updated with new commit SHA
Step 8: Second Save Command Test
Action: Execute onx save -m "Add goodbye message"
Expected Result:
- ✅ Save command succeeds
- ✅ Workstreams.json shows 2 commits
- ✅ New branch reference created (
refs/onyx/workstreams/{name}/commit-2
) - ✅ Git history shows 2 commits in workstream
Step 9: Undo Command Test
Action: Execute onx undo
(should revert last save)
Expected Result:
- ✅ Undo command succeeds without errors
- ✅
main.py
content reverted to previous state (only "hello world") - ✅ Workstreams.json shows 1 commit (second commit removed)
- ✅ Git state reverted accordingly
- ✅ Undo operation logged to oplog
Step 10: Final Daemon Cleanup
Action: Stop daemon Expected Result:
- ✅
onx daemon stop
succeeds - ✅
onx daemon status
shows daemon not running - ✅
.onx/daemon.pid
file removed - ✅ Daemon process terminated cleanly
Additional Verification Tests
Workstream Integration
- Verify workstreams.json structure integrity
- Check commit sequence and parent-child relationships
- Validate timestamps and metadata
Git Compatibility
- Verify standard Git commands work on repository
- Check that commits are visible via
git log
- Verify branch references are properly created
Error Handling
- Test daemon behavior when restarted
- Test save command without active workstream
- Test undo on empty oplog
Success Criteria
- All 10 primary steps pass expected results
- Daemons start/stop cleanly
- Automatic snapshots created consistently
- Save and undo operations work as designed
- Repository remains in valid state
- No error messages or corruption