Skip to content

Add read-only connection test endpoint#223

Merged
smithaldon1 merged 1 commit into
mainfrom
feat/issue-209-test-connection-api
May 23, 2026
Merged

Add read-only connection test endpoint#223
smithaldon1 merged 1 commit into
mainfrom
feat/issue-209-test-connection-api

Conversation

@smithaldon1
Copy link
Copy Markdown
Member

Closes #209

Summary

  • Add POST /connection-profiles/{profile_id}/test for read-only connection diagnostics.
  • Add deterministic fake protocol clients for OPC-UA, MQTT, and BACnet test behavior before live adapters land.
  • Return structured status, timing, readable messages, and protocol-specific diagnostics.
  • Handle unreachable, invalid stored profile, disabled profile, and missing profile cases.
  • Redact credential-like values and avoid returning configured secret/certificate reference names.
  • Keep diagnostics separate from ingestion: testing a profile does not start polling, subscriptions, or event writes.

Test Evidence

  • .venv/bin/python -m pytest services/api/tests/test_connection_profiles_api.py - passed, 16 tests.
  • make test-integration - passed, 67 tests.
  • make test - passed, 239 tests.
  • make lint - passed.
  • make typecheck - passed.
  • make docs - passed placeholder docs target: "Docs are Markdown-only in the MVP skeleton; no docs checker is configured yet."
  • git diff --check and git diff --cached --check - passed.

Docs Impact

  • Updated services/api/README.md with the test endpoint and fake-client boundary.
  • Updated docs/DATA_CONTRACTS.md with the diagnostic response contract.
  • Updated docs/LEARNING_LOG.md.

Follow-up Work

Copy link
Copy Markdown
Member Author

@smithaldon1 smithaldon1 left a comment

Choose a reason for hiding this comment

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

Reviewed and approved for merge

@smithaldon1 smithaldon1 merged commit ab5761c into main May 23, 2026
3 checks passed
@smithaldon1 smithaldon1 deleted the feat/issue-209-test-connection-api branch May 23, 2026 21:04
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.

4. Feature: Add read-only connection test endpoint with redacted results

1 participant