Skip to content

fix(backend): restore full pytest suite #267

@alexandervazquez98

Description

@alexandervazquez98

Pre-flight Checks

  • I searched existing issues for backend full-suite pytest failures and found no duplicate.
  • I understand this issue needs status:approved before a PR is opened.

Bug Description

The backend full pytest suite is currently red in the Docker-based local test environment. This was discovered while verifying the category-technology-icons SDD change. Focused category-icons backend tests pass, but the full suite has many unrelated failures that block full verification gates.

Steps to Reproduce

  1. Create/use a local mock .env based on .env.example with non-secret test values.
  2. Start the backend test stack: docker compose up -d neo4j postgres backend.
  3. Inside the backend container, install dev test dependencies if needed: python -m pip install -r requirements-dev.txt.
  4. Run full backend tests: docker compose exec -T backend python -m pytest.

Expected Behavior

The backend full pytest suite should pass, or failures should be intentionally quarantined with clear ownership.

Actual Behavior

Full backend pytest result:

101 failed, 947 passed, 1 skipped

Triage summary by module:

test_cli_worker.py: 34 failures
test_routers_events.py: 13 failures
test_rtus_router.py: 12 failures
test_routers_metrics_events.py: 10 failures
test_dictionary_service.py: 8 failures
test_rtu_sensor_repo.py: 5 failures
test_event_correlation.py: 4 failures
test_routers_links.py: 4 failures
Other auth/docs/dictionary/RTU files: 11 failures
test_routers_nodes.py: 1 uncertain auth-policy failure

Focused category-icons backend verification passed separately:

docker compose exec -T backend python -m pytest tests/test_routers_catalog.py tests/test_node_service.py tests/test_topology_repo_nodes.py
117 passed

Operating System

Linux

Agent / Client

OpenCode

Shell

bash

Relevant Logs

See the triage summary above. The failure groups appear predominantly outside the category-icons change scope, but they still block full backend verification.

Additional Context

This should be handled as a separate backend test-suite stabilization issue rather than mixed into the category icon PR slice, to preserve review focus.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions