Skip to content

test: Add unit tests for FabricClosestPeer input plugin#1839

Merged
openminddev merged 2 commits intoOpenMind:mainfrom
Wanbogang:add-unit-test-fabric-closest-peer
Jan 26, 2026
Merged

test: Add unit tests for FabricClosestPeer input plugin#1839
openminddev merged 2 commits intoOpenMind:mainfrom
Wanbogang:add-unit-test-fabric-closest-peer

Conversation

@Wanbogang
Copy link
Copy Markdown
Contributor

This PR adds comprehensive unit tests for the FabricClosestPeer input plugin located in src/inputs/plugins/fabric_closest_peer.py.

The tests cover:

  • Initialization logic and default configuration.
  • Polling behavior in mock mode (_poll).
  • Polling behavior when fetching data via HTTP requests (_poll), including successful responses, missing peer data, and request exceptions.
  • Handling of missing latitude/longitude from the IO provider.
  • Processing of raw input to text (raw_to_text).
  • Formatting of the latest buffer output (formatted_latest_buffer).

All tests are passing.

@Wanbogang Wanbogang requested a review from a team as a code owner January 23, 2026 00:56
@github-actions github-actions Bot added python Python code tests Test files labels Jan 23, 2026
@openminddev openminddev merged commit 51d4e61 into OpenMind:main Jan 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Python code tests Test files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants