Skip to content

chore: Add acceptance tests before implementing security and refactoring changes #938

@TomerFi

Description

@TomerFi

Context

Various review tools (CodeRabbit, Sourcery, Snyk, etc.) have flagged security improvements and refactoring opportunities in this project. Before implementing these changes, we need proper acceptance/E2E tests to ensure we don't break working functionality.

The Problem

Currently, there's no way to test the webapp's integration with Switcher devices without real hardware. This makes it risky to:

  • Apply security fixes (e.g., running container as non-root user)
  • Refactor code based on review tool recommendations
  • Upgrade dependencies that might affect device communication

Blocker

We're adding a testing module to aioswitcher that will provide mock device infrastructure:

Discussion: TomerFi/aioswitcher#851

Plan

  1. Wait for / implement aioswitcher.testing module
  2. Add acceptance tests to this project using the mock infrastructure
  3. Then proceed with security fixes and refactoring

Acceptance Criteria

  • aioswitcher.testing module is available
  • Acceptance tests cover core API endpoints
  • Tests run in CI without real devices
  • Safe to proceed with security/refactoring changes

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions