-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Overview
Currently, the test environment manages environment variables through the tests/.env file. By consolidating test mock values as constants, we can achieve a more predictable and maintainable test environment.
Current Issues
- Test environment variables are managed through
tests/.envfile - Tests have dependencies on environment variables
- Test results may depend on environment configuration
Proposed Improvements
1. Consolidate Test Constants
- Consolidate test constants in
tests/const.pyortests/common.py - Define mock values (usernames, credentials, API responses, etc.) as constants
- Replace environment variable references with constant references
2. Eliminate Environment Variable Dependencies
- Completely eliminate dependencies on environment variables in test environment
- Remove
tests/.envfile
Expected Benefits
- Simplified Setup: No need to configure environment variables for test execution
- Improved Reproducibility: Test results are not dependent on environment
- Better Maintainability: Mock values are consolidated in one place
- Enhanced Security: Clear separation of test credentials
- Simplified CI/CD: No need for environment variable configuration in GitHub Actions
Implementation Steps
- Create
tests/const.pyfile and define test constants - Replace environment variable references with constant references in existing test code
- Delete
tests/.envfile - Verify CI/CD workflow operation
- Update documentation
Related Files
tests/.env(to be deleted)tests/common.py(modify environment variable check functions)tests/test_*.py(fix environment variable references).github/workflows/release.yml(CI/CD verification)
Notes
- MCP build script (
mcp/build.sh) conditional testing will remain as is - No impact on production environment
SSKY_USERusage
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels