yusyus
b2c8dd0984
test: Add comprehensive E2E tests for install_skill tool
Adds end-to-end integration tests for both MCP and CLI interfaces:
Test Coverage (24 total tests, 23 passed, 1 skipped):
Unit Tests (test_install_skill.py - 13 tests):
- Input validation (2 tests)
- Dry-run mode (2 tests)
- Mandatory enhancement verification (1 test)
- Phase orchestration with mocks (2 tests)
- Error handling (3 tests)
- Options combinations (3 tests)
E2E Tests (test_install_skill_e2e.py - 11 tests):
1. TestInstallSkillE2E (5 tests)
- Full workflow with existing config (no upload)
- Full workflow with config fetch phase
- Dry-run preview mode
- Scrape phase error handling
- Enhancement phase error handling
2. TestInstallSkillCLI_E2E (5 tests)
- CLI dry-run via direct function call
- CLI validation error handling
- CLI help command
- Full CLI workflow with mocks
- Unified CLI command (skipped due to subprocess asyncio issue)
3. TestInstallSkillE2E_RealFiles (1 test)
- Real scraping with mocked enhancement/upload
Features Tested:
- ✅ MCP tool interface (install_skill_tool)
- ✅ CLI interface (skill-seekers install)
- ✅ Config type detection (name vs path)
- ✅ 5-phase workflow orchestration
- ✅ Mandatory enhancement enforcement
- ✅ Dry-run mode
- ✅ Error handling at each phase
- ✅ Real file I/O operations
- ✅ Help/validation commands
Test Approach:
- Minimal mocking (only enhancement/upload for speed)
- Real config files and file operations
- Direct function calls (more reliable than subprocess)
- Comprehensive error scenarios
Run Tests:
pytest tests/test_install_skill.py tests/test_install_skill_e2e.py -v
Results: 23 passed, 1 skipped in 0.39s
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-21 20:24:15 +03:00
..
2025-10-29 23:19:32 +03:00
2025-10-19 02:08:58 +03:00
2025-11-29 22:13:13 +03:00
2025-10-19 17:01:37 +03:00
2025-11-07 01:21:29 +03:00
2025-11-30 12:25:55 +03:00
2025-11-20 13:55:46 -08:00
2025-11-29 22:13:13 +03:00
2025-11-10 21:35:44 +03:00
2025-11-30 00:13:49 +03:00
2025-12-21 19:28:22 +03:00
2025-12-21 19:45:06 +03:00
2025-11-29 21:55:46 +03:00
2025-12-21 20:24:15 +03:00
2025-12-21 20:17:59 +03:00
2025-11-07 01:14:24 +03:00
2025-11-29 22:13:13 +03:00
2025-11-07 01:14:24 +03:00
2025-11-07 01:14:24 +03:00
2025-12-21 19:45:06 +03:00
2025-12-21 18:40:50 +03:00
2025-11-29 21:34:51 +03:00
2025-11-07 01:14:24 +03:00
2025-11-07 01:21:29 +03:00
2025-10-23 21:43:05 +03:00
2025-10-23 21:43:05 +03:00
2025-11-29 21:55:46 +03:00
2025-10-26 13:05:39 +03:00
2025-11-29 21:34:51 +03:00
2025-11-07 01:14:24 +03:00
2025-11-29 21:34:51 +03:00
2025-11-29 22:56:37 +03:00
2025-12-21 19:28:22 +03:00
2025-11-29 21:34:51 +03:00
2025-11-11 22:26:52 +03:00
2025-11-07 01:21:29 +03:00
2025-11-10 21:35:44 +03:00
2025-11-07 01:21:29 +03:00