Add nil-input regression coverage for filterIndexes - #7317
Add nil-input regression coverage for filterIndexes#7317wangyusheng1985 wants to merge 3 commits into
Conversation
✅ Deploy Preview for pipecd-site canceled.
|
|
👋 Hi @wangyusheng1985, welcome to PipeCD and thanks for opening your first pull request! We’re really happy to have you here Before your PR gets merged, please check a few important things below. Helpful resources
DCO Sign-offAll commits must include a In case you forget to sign-off your commit(s), follow these steps: For the last commit: git commit --amend --signoff
git push --force-with-leaseFor multiple commits: git rebase --signoff origin/master
git push --force-with-leaseRun checks locallyBefore pushing updates, please run: make checkThis runs the same checks as CI and helps catch issues early. 💬 Need help?If anything is unclear, feel free to ask in this PR or join us on the CNCF Slack in the #pipecd channel. Thanks for contributing to PipeCD! ❤️ |
There was a problem hiding this comment.
🟢 Approval recommended
The change is limited to a small, clear unit-test addition that matches the current filterIndexes behavior and does not affect production code.
Pull request overview
Adds a focused regression test to ensure filterIndexes correctly handles a nil indexes input without panicking and preserves the current behavior (returning nil when given nil).
Changes:
- Add a new
TestFilterIndexestable-driven case coveringindexes == nilwith non-emptyexcludes.
File summaries
| File | Description |
|---|---|
| pkg/app/ops/firestoreindexensurer/indexes_test.go | Adds regression test coverage for filterIndexes when indexes is nil. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Summary
filterIndexeswith nil input.Validation
gofmt -w pkg/app/ops/firestoreindexensurer/indexes_test.gogo test ./pkg/app/ops/firestoreindexensurer -run '^TestFilterIndexes$' -count=1git diff --checkDoes this PR introduce a user-facing change?: