Skip to content

test: add unit tests for bundleArchive in internal/pkg/platform - #769

Merged
mwbrooks merged 2 commits into
mainfrom
mwbrooks-test-bundle-archive
Nov 10, 2026
Merged

mwbrooks merged 2 commits into
mainfrom
mwbrooks-test-bundle-archive

Conversation

@mwbrooks

Copy link
Copy Markdown
Member

Changelog

N/A - adds tests only, with no user-facing changes.

Summary

This pull request adds unit tests for bundleArchive in internal/pkg/platform/deploy.go, which had no test coverage. It is one in a series of small coverage PRs for maintainers.

  • Adds Test_bundleArchive to internal/pkg/platform/deploy_test.go with cases for nested file paths and contents in the zip, an empty directory, and a missing directory
  • Raises internal/pkg/platform coverage from 45.2% to 51.6%

Testing

  1. Run go test ./internal/pkg/platform/... -run Test_bundleArchive -v and confirm the cases pass

Requirements

@mwbrooks
mwbrooks requested a review from a team as a code owner November 10, 2026 16:04
@mwbrooks mwbrooks added this to the Next Release milestone Nov 10, 2026
@mwbrooks mwbrooks added code health M-T: Test improvements and anything that improves code health semver:patch Use on pull requests to describe the release version increment labels Nov 10, 2026
@mwbrooks mwbrooks self-assigned this Nov 10, 2026
@codecov

codecov Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Codecov Report

βœ… All modified and coverable lines are covered by tests.
βœ… Project coverage is 78.90%. Comparing base (984bcfe) to head (0b45a72).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #769      +/-   ##
==========================================
+ Coverage   78.64%   78.90%   +0.26%     
==========================================
  Files         240      240              
  Lines       18205    18205              
==========================================
+ Hits        14317    14365      +48     
+ Misses       3888     3840      -48     

β˜” View full report in Codecov by Harness.
πŸ“’ Have feedback on the report? Share it here.

πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@zimeg zimeg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ§ͺ @mwbrooks Thanks for covering bundleArchive! I like that this checks the missing-directory error path too, not just the zip-contents happy path. LGTM!

@mwbrooks

Copy link
Copy Markdown
Member Author

Thanks @zimeg for the quick review! πŸ™‡

@mwbrooks
mwbrooks merged commit 97193c3 into main Nov 10, 2026
14 checks passed
@mwbrooks
mwbrooks deleted the mwbrooks-test-bundle-archive branch November 10, 2026 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code health M-T: Test improvements and anything that improves code health semver:patch Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants