Skip to content

Deprecate tests/.env and consolidate test constants #35

@mkyutani

Description

@mkyutani

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/.env file
  • 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.py or tests/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/.env file

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

  1. Create tests/const.py file and define test constants
  2. Replace environment variable references with constant references in existing test code
  3. Delete tests/.env file
  4. Verify CI/CD workflow operation
  5. 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_USER usage

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions