test: add shouldPatchCoredns WSL2 unit tests - #1274
Conversation
Follow up of #1207 Add tests verifying CoreDNS patching is skipped on WSL2 and still applied on non-WSL runtimes. Existing tests updated to pass explicit platform opts so they work correctly when run from a WSL2 host.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughUpdated tests for shouldPatchCoredns to call the function with a full runtime/context options object and to assert behavior for known runtimes on darwin, and for docker-desktop when WSL is detected on linux. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
@jieunl24 can you look into the checks failures, please? looks like formatting. |
<!-- markdownlint-disable MD041 --> ## Summary Follow up of #1207 to add unit tests ## Changes Add tests verifying CoreDNS patching is skipped on WSL2 and still applied on non-WSL runtimes. Existing tests updated to pass explicit platform opts so they work correctly when run from a WSL2 host. ## Type of Change <!-- Check the one that applies. --> - [ ] Code change for a new feature, bug fix, or refactor. - [ ] Code change with doc updates. - [ ] Doc only. Prose changes without code sample modifications. - [ ] Doc only. Includes code sample changes. ## Testing <!-- What testing was done? --> - [X] `npx prek run --all-files` passes (or equivalently `make check`). - [X] `npm test` passes. - [ ] `make docs` builds without warnings. (for doc-only changes) ## Checklist ### General - [X] I have read and followed the [contributing guide](https://github.com/NVIDIA/NemoClaw/blob/main/CONTRIBUTING.md). - [ ] I have read and followed the [style guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md). (for doc-only changes) ### Code Changes <!-- Skip if this is a doc-only PR. --> - [X] Formatters applied — `npx prek run --all-files` auto-fixes formatting (or `make format` for targeted runs). - [X] Tests added or updated for new or changed behavior. - [X] No secrets, API keys, or credentials committed. - [ ] Doc pages updated for any user-facing behavior changes (new commands, changed defaults, new features, bug fixes that contradict existing docs). ### Doc Changes <!-- Skip if this PR has no doc changes. --> - [ ] Follows the [style guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md). Try running the `update-docs` agent skill to draft changes while complying with the style guide. For example, prompt your agent with "`/update-docs` catch up the docs for the new changes I made in this PR." - [ ] New pages include SPDX license header and frontmatter, if creating a new page. - [ ] Cross-references and links verified. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Improved platform runtime tests to pass full context options and validate behavior for specific known runtimes. * Added a coverage case ensuring WSL detection prevents the patch in the appropriate scenario. * Retained the existing test for skipping unknown runtimes. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Carlos Villela <cvillela@nvidia.com>
<!-- markdownlint-disable MD041 --> ## Summary Follow up of NVIDIA#1207 to add unit tests ## Changes Add tests verifying CoreDNS patching is skipped on WSL2 and still applied on non-WSL runtimes. Existing tests updated to pass explicit platform opts so they work correctly when run from a WSL2 host. ## Type of Change <!-- Check the one that applies. --> - [ ] Code change for a new feature, bug fix, or refactor. - [ ] Code change with doc updates. - [ ] Doc only. Prose changes without code sample modifications. - [ ] Doc only. Includes code sample changes. ## Testing <!-- What testing was done? --> - [X] `npx prek run --all-files` passes (or equivalently `make check`). - [X] `npm test` passes. - [ ] `make docs` builds without warnings. (for doc-only changes) ## Checklist ### General - [X] I have read and followed the [contributing guide](https://github.com/NVIDIA/NemoClaw/blob/main/CONTRIBUTING.md). - [ ] I have read and followed the [style guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md). (for doc-only changes) ### Code Changes <!-- Skip if this is a doc-only PR. --> - [X] Formatters applied — `npx prek run --all-files` auto-fixes formatting (or `make format` for targeted runs). - [X] Tests added or updated for new or changed behavior. - [X] No secrets, API keys, or credentials committed. - [ ] Doc pages updated for any user-facing behavior changes (new commands, changed defaults, new features, bug fixes that contradict existing docs). ### Doc Changes <!-- Skip if this PR has no doc changes. --> - [ ] Follows the [style guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md). Try running the `update-docs` agent skill to draft changes while complying with the style guide. For example, prompt your agent with "`/update-docs` catch up the docs for the new changes I made in this PR." - [ ] New pages include SPDX license header and frontmatter, if creating a new page. - [ ] Cross-references and links verified. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Improved platform runtime tests to pass full context options and validate behavior for specific known runtimes. * Added a coverage case ensuring WSL detection prevents the patch in the appropriate scenario. * Retained the existing test for skipping unknown runtimes. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Carlos Villela <cvillela@nvidia.com>
<!-- markdownlint-disable MD041 --> ## Summary Follow up of NVIDIA#1207 to add unit tests ## Changes Add tests verifying CoreDNS patching is skipped on WSL2 and still applied on non-WSL runtimes. Existing tests updated to pass explicit platform opts so they work correctly when run from a WSL2 host. ## Type of Change <!-- Check the one that applies. --> - [ ] Code change for a new feature, bug fix, or refactor. - [ ] Code change with doc updates. - [ ] Doc only. Prose changes without code sample modifications. - [ ] Doc only. Includes code sample changes. ## Testing <!-- What testing was done? --> - [X] `npx prek run --all-files` passes (or equivalently `make check`). - [X] `npm test` passes. - [ ] `make docs` builds without warnings. (for doc-only changes) ## Checklist ### General - [X] I have read and followed the [contributing guide](https://github.com/NVIDIA/NemoClaw/blob/main/CONTRIBUTING.md). - [ ] I have read and followed the [style guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md). (for doc-only changes) ### Code Changes <!-- Skip if this is a doc-only PR. --> - [X] Formatters applied — `npx prek run --all-files` auto-fixes formatting (or `make format` for targeted runs). - [X] Tests added or updated for new or changed behavior. - [X] No secrets, API keys, or credentials committed. - [ ] Doc pages updated for any user-facing behavior changes (new commands, changed defaults, new features, bug fixes that contradict existing docs). ### Doc Changes <!-- Skip if this PR has no doc changes. --> - [ ] Follows the [style guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md). Try running the `update-docs` agent skill to draft changes while complying with the style guide. For example, prompt your agent with "`/update-docs` catch up the docs for the new changes I made in this PR." - [ ] New pages include SPDX license header and frontmatter, if creating a new page. - [ ] Cross-references and links verified. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Improved platform runtime tests to pass full context options and validate behavior for specific known runtimes. * Added a coverage case ensuring WSL detection prevents the patch in the appropriate scenario. * Retained the existing test for skipping unknown runtimes. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Carlos Villela <cvillela@nvidia.com>
Summary
Follow up of #1207 to add unit tests
Changes
Add tests verifying CoreDNS patching is skipped on WSL2 and still applied on non-WSL runtimes. Existing tests updated to pass explicit platform opts so they work correctly when run from a WSL2 host.
Type of Change
Testing
npx prek run --all-filespasses (or equivalentlymake check).npm testpasses.make docsbuilds without warnings. (for doc-only changes)Checklist
General
Code Changes
npx prek run --all-filesauto-fixes formatting (ormake formatfor targeted runs).Doc Changes
update-docsagent skill to draft changes while complying with the style guide. For example, prompt your agent with "/update-docscatch up the docs for the new changes I made in this PR."Summary by CodeRabbit