Skip to content

tests: add unit tests for api/tools/tools.py (fixes #298)#299

Open
124padmini wants to merge 5 commits intojenkinsci:mainfrom
124padmini:tests/add-unit-tests-for-tools
Open

tests: add unit tests for api/tools/tools.py (fixes #298)#299
124padmini wants to merge 5 commits intojenkinsci:mainfrom
124padmini:tests/add-unit-tests-for-tools

Conversation

@124padmini
Copy link
Copy Markdown

Summary

Adds unit tests for chatbot-core/api/tools/tools.py which had zero test coverage.

Tests Added

File: tests/unit/tools/test_tools.py

  • TestSearchStackoverflowThreads — 2 tests
  • TestSearchPluginDocs — 3 tests (with/without plugin name, invalid plugin)
  • TestSearchJenkinsDocs — 1 test
  • TestSearchCommunityThreads — 1 test (verifies semantic_weight=0.7)

Results

All 7 tests are passing locally.

Closes #298

@124padmini 124padmini requested a review from a team as a code owner March 20, 2026 14:14
@124padmini
Copy link
Copy Markdown
Author

Hi @krisstern, @shivaylamba, and @chiraggupta, could you please approve the pending workflows and review when you get a chance? Happy to make any changes needed.
Thanks!

@berviantoleo
Copy link
Copy Markdown
Contributor

Please run the test and lint in your local before running it here

@berviantoleo
Copy link
Copy Markdown
Contributor

Your commit email and your current user is unmatched. Please use the appropriate emails for your commits.

@berviantoleo berviantoleo added the tests This PR adds/removes/updates test cases label Mar 24, 2026
@124padmini 124padmini force-pushed the tests/add-unit-tests-for-tools branch from c5dfcc5 to 4dadd65 Compare March 24, 2026 16:05
@124padmini
Copy link
Copy Markdown
Author

Fixed the commit email mismatch and resolved the Pylint trailing whitespace issue. All 9 tests passing locally with Pylint score 10/10. Pushed the updated commit.

@berviantoleo
Copy link
Copy Markdown
Contributor

Your commit email and your current user is unmatched. Please use the appropriate emails for your commits.

This commit aed06b7 is still unmatch.

@124padmini 124padmini force-pushed the tests/add-unit-tests-for-tools branch from 4dadd65 to c1062cd Compare March 25, 2026 03:05
@124padmini
Copy link
Copy Markdown
Author

Fixed the commit email mismatch on all commits. Both commits now use the correct GitHub no-reply email.

@124padmini
Copy link
Copy Markdown
Author

Hi @berviantoleo, all commit emails are now fixed, and all checks are passing. Could you please approve the pending workflows when you get a chance? Thanks!

@124padmini
Copy link
Copy Markdown
Author

Hi @berviantoleo, @krisstern — all commit emails are fixed and all 21 checks are passing. Could you please take a final look when you get a chance? Happy to make any further changes. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests This PR adds/removes/updates test cases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Tests] Add unit tests for api/tools/tools.py — currently zero test coverage

2 participants