Skip to content

add destruction check to e2e test - #1096

Open
annashamray wants to merge 2 commits into
mainfrom
chore/1081-improve-e2e-test-with-descruction-check
Open

add destruction check to e2e test#1096
annashamray wants to merge 2 commits into
mainfrom
chore/1081-improve-e2e-test-with-descruction-check

Conversation

@annashamray

Copy link
Copy Markdown
Contributor

fixes #1081

…2e test

In the e2e test we add the check that the task to delete a specific desctruction list has started.
To do so we had to emulate celery beat schedule including it into the async test context.
Celery tasks are synchronous, they include django ORM that can't be executed in async, so we had to add
a sync thread for them using `sync_to_async()`.
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.31%. Comparing base (cfa6d72) to head (5c33c4c).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1096   +/-   ##
=======================================
  Coverage   93.31%   93.31%           
=======================================
  Files         141      141           
  Lines        4712     4712           
=======================================
  Hits         4397     4397           
  Misses        315      315           
Flag Coverage Δ
backend 93.31% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@annashamray
annashamray marked this pull request as ready for review September 11, 2026 10:20

@viktorvanwijk viktorvanwijk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :)

Should we document somewhere why the VCR setup doesn't work (for future references), or is that too complicated to write down neatly?

@annashamray

Copy link
Copy Markdown
Contributor Author

@viktorvanwijk couldn't make it work with async mostly and setting it up was too cumbersome for the existing e2e test classes. I also tried to convert it to a pytest, since in OAB we are moving away from django tests to pytests in terms of vcr using, but this one was too complicated for me. So can't pinpoint the single blocking issue.

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.

Improve tests for actual destruction

3 participants