Skip to content

Enhance test coverage across entire codebase for codecov. - #489

Open
MrKeiKun wants to merge 5 commits into
tofuutils:mainfrom
MrKeiKun:fix-388-comprehensive-coverage
Open

MrKeiKun wants to merge 5 commits into
tofuutils:mainfrom
MrKeiKun:fix-388-comprehensive-coverage

Conversation

@MrKeiKun

@MrKeiKun MrKeiKun commented Oct 2, 2025

Copy link
Copy Markdown
Contributor

Description
This PR enhances test coverage across the tenv codebase for #388. It has now been rebased onto the latest upstream/main and extended with additional coverage.

Recent updates

  • Added test coverage for the configurable lock path feature: missing-lock-dir handling, folder-scoped locks, and TENV_LOCK_PATH env var resolution (pkg/lockfile, config, versionmanager)
  • Added unit tests for packages that previously had none: versionmanager/semantic/parser/terragrunt, versionmanager/retriever/tofu/dl, versionmanager/retriever/atmos, versionmanager/retriever/terraform, versionmanager/retriever/terragrunt
  • Fixed a .gitignore bug: unanchored entries (terraform, terragrunt, atmos, tofu, tenv, terramate) were matching anywhere in the tree, silently hiding new files under source directories with the same names (e.g. versionmanager/retriever/terraform/)

Changes Made

  • New test files for all major packages including:
    • Core command packages (cmd/terramate/, cmd/tf/)
    • Configuration management (config/)
    • Package utilities (pkg/)
    • Version management system (versionmanager/)
  • Updated dependencies in go.mod and go.sum to support enhanced testing

Test Coverage Areas

  • API message handling (pkg/apimsg/)
  • Architecture-specific code (pkg/archname/)
  • Security and verification (pkg/check/cosign/)
  • Download and file operations (pkg/download/, pkg/fileperm/)
  • GitHub integration (pkg/github/)
  • Compression utilities (pkg/uncompress/)
  • Version management (builder, proxy, semantic versioning)
  • Library examples and edge cases
  • Configurable lock path (pkg/lockfile/, config/)
  • Terragrunt HCL/JSON version-constraint parsing (versionmanager/semantic/parser/terragrunt/)
  • Retriever asset-name and release-extraction logic (versionmanager/retriever/{atmos,terraform,terragrunt,tofu/dl}/)

Referenced Issue: #388

@MrKeiKun

MrKeiKun commented Oct 3, 2025

Copy link
Copy Markdown
Contributor Author

i think,i can say this is partial one. i wanna see pipeline though

@MrKeiKun
MrKeiKun force-pushed the fix-388-comprehensive-coverage branch 9 times, most recently from 33d94df to cf3cad0 Compare October 3, 2025 20:59
@MrKeiKun

MrKeiKun commented Oct 3, 2025

Copy link
Copy Markdown
Contributor Author

Right now, total coverage is at least: 42.7%.

@kvendingoldo

Copy link
Copy Markdown
Collaborator

Checking your PR. I can take some time :)

Signed-off-by: Lorenzo Buitizon <the.keikun@gmail.com>
Signed-off-by: Lorenzo Buitizon <the.keikun@gmail.com>
@MrKeiKun
MrKeiKun force-pushed the fix-388-comprehensive-coverage branch from cf3cad0 to fbbf2a1 Compare August 21, 2026 04:01
…ream

Signed-off-by: Lorenzo Buitizon <the.keikun@gmail.com>
…terraform, terragrunt, atmos, tofu)

Signed-off-by: Lorenzo Buitizon <the.keikun@gmail.com>
Signed-off-by: Lorenzo Buitizon <the.keikun@gmail.com>
@MrKeiKun
MrKeiKun force-pushed the fix-388-comprehensive-coverage branch from fbbf2a1 to 215a160 Compare August 21, 2026 04:06
@MrKeiKun

Copy link
Copy Markdown
Contributor Author

@kvendingoldo this looks ready

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants