Skip to content

test(runbatch): add unit tests for InheritEnv#40

Open
matt-FFFFFF wants to merge 4 commits into
mainfrom
test/inherit-env-unit-tests
Open

test(runbatch): add unit tests for InheritEnv#40
matt-FFFFFF wants to merge 4 commits into
mainfrom
test/inherit-env-unit-tests

Conversation

@matt-FFFFFF
Copy link
Copy Markdown
Owner

Adds unit tests for the InheritEnv method in BaseCommand to cover edge cases like empty maps, nil maps, and overlapping keys.

Copilot AI review requested due to automatic review settings January 6, 2026 12:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds comprehensive unit tests for the InheritEnv method in BaseCommand, which is responsible for merging parent environment variables into child commands without overwriting existing child values.

Key changes:

  • Added 6 test cases covering empty maps, nil maps, non-overlapping keys, and overlapping keys with proper child precedence
  • Tests follow the table-driven pattern consistent with existing tests in the file
  • Tests verify that child environment variables take precedence over parent values when keys overlap

Comment thread internal/runbatch/base_test.go Outdated
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