Skip to content

Conversation

@NouemanKHAL
Copy link
Member

What does this PR do?

Adds a test to verify the use case where the search_string property contains spaces.

Motivation

Our current implementation already support this use case, it's good to add to protect it from regressions and to serve as documentation.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add the qa/skip-qa label if the PR doesn't need to be tested during QA.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

@github-actions
Copy link

github-actions bot commented Jan 28, 2026

⚠️ Recommendation: Add qa/skip-qa label

This PR does not modify any files shipped with the agent.

To help streamline the release process, please consider adding the qa/skip-qa label if these changes do not require QA testing.

@codecov
Copy link

codecov bot commented Jan 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.05%. Comparing base (41350e0) to head (5f1ad66).
⚠️ Report is 8 commits behind head on master.

Additional details and impacted files
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

instance = {'name': 'foo', 'search_string': ['foo bar'], 'exact_match': False}
process = ProcessCheck(common.CHECK_NAME, {}, [instance])
pids = process.find_pids(instance['name'], instance['search_string'], instance['exact_match'])
assert pids == {123}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: could we run the check rather than find_pids and assert the metrics emitted? That way the test will still work even if we refactor out find_pids?

Copy link
Member Author

Choose a reason for hiding this comment

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

Addressed!

Copy link
Contributor

Choose a reason for hiding this comment

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

looks great!! i think you can remove line 254 and 255 now!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants