Skip to content

feat(stac_cli): add unit testing infrastructure and core command tests#472

Open
Pratikdate wants to merge 5 commits intoStacDev:devfrom
Pratikdate:dev
Open

feat(stac_cli): add unit testing infrastructure and core command tests#472
Pratikdate wants to merge 5 commits intoStacDev:devfrom
Pratikdate:dev

Conversation

@Pratikdate
Copy link
Copy Markdown

Description

This PR adds a comprehensive unit testing layer to the stac_cli package and integrates it into the monorepo's CI pipeline. Key changes include:

  • Infrastructure Set-up: Initialized the test/ directory within packages/stac_cli to manage command and utility tests.
  • Environment Mocking: Added a mechanism to safely stub out required environment variables (like STAC_BASE_API_URL and STAC_GOOGLE_CLIENT_ID) during tests to prevent initialization crashes without real API keys.
  • Core Command Tests: Implemented tests for BuildCommand, InitCommand, and DeployCommand to verify registration, name, and descriptions.
  • Utility Reliability: Added tests for FileUtils to validate file system operations (create, read, delete) with automated sandbox cleanup.
  • CI Pipeline Integration:
    • Added a test command to the root melos.yaml.
    • Updated .github/workflows/all_plugins.yaml to include a global test step for all packages.

Related Issues

Closes # (Insert issue number if applicable)

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Code refactor
  • Build configuration change
  • Documentation
  • Chore

@Pratikdate Pratikdate mentioned this pull request Apr 3, 2026
3 tasks
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 5, 2026

CLA assistant check
All committers have signed the CLA.

@Pratikdate Pratikdate marked this pull request as draft April 11, 2026 06:49
@Pratikdate Pratikdate marked this pull request as ready for review April 11, 2026 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants