Skip to content

feat(tests): miscellaneous improvements#220

Open
Molter73 wants to merge 3 commits intomauro/tests/editorsfrom
mauro/tests/misc-improvements
Open

feat(tests): miscellaneous improvements#220
Molter73 wants to merge 3 commits intomauro/tests/editorsfrom
mauro/tests/misc-improvements

Conversation

@Molter73
Copy link
Contributor

@Molter73 Molter73 commented Feb 2, 2026

Description

This adds a few things to our tests in an attempt to reduce the boilerplate needed and improve test maintainability (even if it is only slightly). The changes are:

  • Print the events a test waits for in server.FileActivityService.wait_events. This removes the need to print these events in every test separately.
  • Remove explicit requirement of the fact fixture in tests and rely on the autouse=True decorator.
  • Use Process.in_container to make defining processes that run inside containers less verbose.
  • Make strict mode the default mode for waiting on events. This is more reliable and easier than declaring events that should be ignored by hand.

Checklist

  • Investigated and inspected CI test results
  • Updated documentation accordingly

Automated testing

  • Added unit tests
  • Added integration tests
  • Added regression tests

If any of these don't apply, please comment below.

Testing Performed

CI is enough.

Print the events a server waits in a common place to reduce code
duplication.
With the addition of the autouse feature to the fact fixture the fact
container is spin up and torn down on its own for every test, no need to
declare explicitly.
This change replaces the ignored events for strict mode, this is more
reliable, since a change to how we report events could cause us to miss
the ignored event if it is reported differently. Instead, strict mode
will cause tests to fail if any event that is not expected is found.

We also use the new class method `Process.in_container` to simplify the
definition of processes that run inside containers.
@Molter73 Molter73 requested a review from a team as a code owner February 2, 2026 16:11
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.

1 participant