Skip to content

[tests:bug] Make running tests atomic to prevent database corruption on failure #580

Description

@pandafy

Problem

Currently, running the test suite is not atomic. If any test fails during execution, the database can be left in a broken or inconsistent state, which affects further test runs and developer productivity.

Expected behavior

All tests should be isolated in a way that ensures the database remains consistent, regardless of test outcomes. Failed test runs should not leave the database in a broken state.

Suggested solution

  • Ensure each test either uses a transactional database setup or is properly cleaned up after execution.
  • Consider using fixtures or a setup/teardown process that restores the database state after every test or test suite.
  • Investigate test runner options or custom scripts to enforce atomicity for database operations during tests.

Additional context

Making the test suite atomic will make development safer and more reliable for contributors, avoiding hidden issues due to database state leaks between test runs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtestThis is a testing issue.

    Type

    Fields

    No fields configured for Bug.

    Projects

    Status
    Backlog
    Status
    To do (ansible/docker)
    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions