Skip to content

Tech : Correction pour les tests utilisant temporary_bucket échouant "aléatoirement" sur la CI#6510

Merged
tonial merged 1 commit into
masterfrom
rsebille/ci-clever-bucket
Jul 10, 2025
Merged

Tech : Correction pour les tests utilisant temporary_bucket échouant "aléatoirement" sur la CI#6510
tonial merged 1 commit into
masterfrom
rsebille/ci-clever-bucket

Conversation

@rsebille

@rsebille rsebille commented Jul 9, 2025

Copy link
Copy Markdown
Contributor

🤔 Pourquoi ?

3 tests dans test_prolongation_requests.py écrasais directement default_storage.location, cet écrasement était maqué par l'ancienne fixture storage_prefix_per_test qui n'existe plus depuis #6464.

A voir si on garde le commit pour 1 bucket par session ou pas.

🏝️ Comment tester ?

En local avec le minio, trois possibilités :

  • pytest -p no:randomly -v tests/www/approvals_views/test_prolongation_requests.py::test_show_view tests/communications/test_admin.py
  • pytest -p no:randomly -v tests/www/approvals_views/test_prolongation_requests.py::test_show_view_no_siae tests/communications/test_admin.py
  • pytest -p no:randomly -v tests/www/approvals_views/test_prolongation_requests.py::test_snapshot_by_status tests/communications/test_admin.py

Since e4a82c7 we don't generate a new location for each tests so
modifying the `default_storage` global is persisted between tests which
then break the ones launched after those ones.
This was introduced in 4458871.
@rsebille rsebille self-assigned this Jul 9, 2025
@rsebille rsebille added the tech label Jul 9, 2025

@tonial tonial 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.

Nice !

@rsebille
rsebille force-pushed the rsebille/ci-clever-bucket branch from a8f81b5 to 4bc8874 Compare July 10, 2025 07:32
@tonial
tonial added this pull request to the merge queue Jul 10, 2025
Merged via the queue into master with commit 7274656 Jul 10, 2025
14 checks passed
@tonial
tonial deleted the rsebille/ci-clever-bucket branch July 10, 2025 07:57
@celine-m-s

Copy link
Copy Markdown
Contributor

Merci !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants