Skip to content

🧪 Testing Improvement: Add tests for SearchConfig builder methods - #24

Open
undivisible wants to merge 2 commits into
mainfrom
test-blocklist-config-1728774342231610336
Open

🧪 Testing Improvement: Add tests for SearchConfig builder methods#24
undivisible wants to merge 2 commits into
mainfrom
test-blocklist-config-1728774342231610336

Conversation

@undivisible

@undivisible undivisible commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

🎯 What: The testing gap addressed is the lack of unit tests for the builder methods of SearchConfig, specifically with_blocklist, which populates the blocklist configuration correctly when initialized with an iterator.
📊 Coverage: The scenarios now tested include checking that with_blocklist properly adds entries to the blocklist array in the config. For completeness, with_allowlist, with_timeout, and with_cache have been covered as well.
Result: A significant improvement in test coverage for the configuration component. This ensures the builder methods function as intended.


PR created automatically by Jules for task 1728774342231610336 started by @undivisible


Note

Low Risk
No production code changes—only a new unit test in the existing test module.

Overview
Adds a unit test search_config_builder_methods_populate_fields in src/lib.rs that chains SearchConfig::new with with_blocklist, with_allowlist, with_timeout, and with_cache, then asserts the resulting config holds the expected blocklist, allowlist, timeout, cache capacity, and cache TTL.

This is test-only coverage for the builder API; runtime search behavior is unchanged.

Reviewed by Cursor Bugbot for commit 519add6. Configure here.

@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

google-labs-jules Bot and others added 2 commits September 11, 2026 11:25
Add `search_config_builder_methods_populate_fields` to `src/lib.rs` tests to ensure that `with_blocklist` correctly populates the builder configuration. Tests were also added for other missing builder methods like `with_allowlist`, `with_timeout`, and `with_cache` for completeness.

Co-authored-by: undivisible <136312656+undivisible@users.noreply.github.com>
Cache keys are (embedded, mode, query) after the collision fix; the
clear_cache unit test still inserted a bare String and failed to compile.
@undivisible
undivisible force-pushed the test-blocklist-config-1728774342231610336 branch from 519add6 to 7697737 Compare September 11, 2026 03:29
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.

1 participant