Skip to content

Add functional tests for the loki + splunk alert plugins and the ssh deploy plugin #202

Description

@LiorFink00

Found during a full feature-coverage audit on main (fc58e08). These features work (verified live where reachable) — the gap is missing automated tests, not broken behavior.

Three plugins are fully implemented (real httpx/SSH send logic + SSRF guard) and load correctly via the loader, but no test imports/exercises them — unlike webhook/mdm which are well-tested:

  • plugins/alert/loki/plugin.pyalert() builds a Loki stream payload, applies SSRF guard, POSTs. Test with a mocked httpx (assert payload shape, labels parsing, api_key header, raise-on-non-2xx, SSRF rejection).
  • plugins/alert/splunk/plugin.pyalert() POSTs to HEC with token. Test payload + auth header + error handling (mirror test_webhook_plugin.py).
  • plugins/deploy/ssh/plugin.pydeploy() real logic; test with a fake SSH target / mocked transport (mirror test_mdm_plugin.py + fake_jamf.py).

Note: #40 (Splunk) and #39 (SSH) are titled "Implement …" but the plugins already exist and load — those issues may be stale; this issue is specifically about test coverage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    pythonPull requests that update python codetestsTask on app tests

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions