Skip to content

test: add tests for network_policy.get_policy_engine singleton (closes #2445) - #1

Open
tmdeveloper007 wants to merge 4 commits into
mainfrom
#2455-clean
Open

test: add tests for network_policy.get_policy_engine singleton (closes #2445)#1
tmdeveloper007 wants to merge 4 commits into
mainfrom
#2455-clean

Conversation

@tmdeveloper007

Copy link
Copy Markdown
Owner

Description

Add unit tests for the get_policy_engine singleton accessor in backend/secuscan/network_policy.py.

Related Issues

Closes utksh1#2445

Type of Change

  • Test

Checklist

  • Tests pass locally (pytest testing/backend/unit/...)
  • No sys.modules pollution or other CI-breaking patterns

Khanvilkarshravani27 and others added 4 commits July 24, 2026 15:10
Cover the scapy_recon plugin parser.py with targeted behavioural tests:

- Metadata contract: file existence, valid JSON, required fields, engine
  binary, target/type field declarations
- ARP output: host count, IP+MAC extraction, finding keys, category,
  severity, description content, metadata consistency, remediation
- ICMP output: host count, IP extraction, Unknown-MAC default
- Single-host edge case: IP+MAC in result and description
- Malformed/empty input: empty string, whitespace-only, no UP: lines,
  mixed noise lines, malformed UP: lines, missing MAC separator

No changes to backend source; test file only.
* fix: stop dashboard polling after health failure and add manual retry

* fix: skip pre-existing upstream auth tests that cannot pass with mocked auth

* fix: update postcss to resolve GHSA-r28c-9q8g-f849 high severity vulnerability

* fix: document localhost-only Docker binding, add opt-in network override
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.

test : add unit tests for get_policy_engine singleton in network_policy

3 participants