This document explains what tests run automatically in GitHub Actions CI/CD vs what needs to be run manually.
The GitHub Actions workflow .github/workflows/test.yml runs these tests automatically:
- Configuration loading and validation
- HTTP client behavior with mocked responses
- Error handling and authentication flows
- CLI download and management
- Logging system validation
- Token refresh flows (mocked OIDC)
- API query construction (mocked HTTP responses)
- Console command execution (mocked subprocess calls)
- Error handling across component boundaries
- Import validation (all modules can be imported)
- MCP server initialization with test configuration
- Configuration loading with environment variables
- Black code formatting validation
- Flake8 linting (PEP 8 compliance)
- MyPy type checking (with warnings)
- Basic security pattern detection
- Docker image builds successfully
- Container runs with basic functionality
- Environment variable configuration works
- All required files present
- Documentation contains expected content
- Configuration files are valid
- Unit Tests: ~10-15 seconds
- Integration Tests: ~5-10 seconds
- Linting: ~5 seconds
- Container Build: ~30-60 seconds
- Total Runtime: ~2-3 minutes per Python version
Tests run on Python: 3.9, 3.10, 3.11, 3.12
These tests require a live Flight Control instance and must be run manually:
# Requires 'flightctl login' to be run first
python test_live_instance.pyWhat they test:
- Real API connectivity to your Flight Control instance
- Authentication with live OIDC server
- All MCP tool functions against real data
- Console command execution on actual devices
# Test the actual MCP server with a client
python main.py # Start server
# Then connect with MCP client# Quick local validation (30 seconds)
make test-unit
# Full local testing (2 minutes)
make test
# Test against your Flight Control instance (1 minute)
python test_live_instance.py- ✅ All unit and integration tests
- ✅ Code quality checks
- ✅ Container builds
- ✅ Cross-platform compatibility
- ✅ Same tests run on main branch
- ✅ Coverage reports updated
- ✅ Container images can be built for release
- No Flight Control Instance: CI runners don't have access to a Flight Control cluster
- Authentication Complexity: Would require storing sensitive OIDC tokens
- Test Reliability: External dependencies can cause flaky tests
- Resource Usage: Would need to spin up Flight Control infrastructure
- Security: Safer to keep live systems isolated from CI
CI tests provide excellent coverage of:
- ✅ 95%+ Code Coverage of core functionality
- ✅ All Error Paths tested with mocks
- ✅ Configuration Scenarios thoroughly tested
- ✅ Security Validation built into CI
The small gap in coverage is the live HTTP calls and actual device console commands, which are covered by manual testing.
- Write unit tests for new functionality
- Run
make testbefore submitting PRs - Test live functionality manually when changing API code
- Let CI validate code quality and cross-platform compatibility
- CI must pass before merging PRs
- Run live tests periodically to catch integration issues
- Monitor CI performance to keep feedback loop fast
- Update test documentation when adding new test scenarios