Skip to content

testing: monkeypatch over settings.REPO_ROOT instead of over-writing (Bug 2031725)#1090

Closed
cgsheeh wants to merge 1 commit intomozilla-conduit:mainfrom
cgsheeh:intermittent-test
Closed

testing: monkeypatch over settings.REPO_ROOT instead of over-writing (Bug 2031725)#1090
cgsheeh wants to merge 1 commit intomozilla-conduit:mainfrom
cgsheeh:intermittent-test

Conversation

@cgsheeh
Copy link
Copy Markdown
Member

@cgsheeh cgsheeh commented Apr 15, 2026

We previously overwrote the settings.REPO_ROOT variable in
test__models__Repo__pulse_routing_key_validator, which would
then cause failures in test__models__Repo__system_path_validator,
since the variable we used at test collection time.

Instead, monkeypatch over the variable in the Pulse test to
avoid polluting other tests. Also create the path variable inside
the test, instead of at module collection time, to avoid regressing
this issue in the future.

…g (Bug 2031725)

We previously overwrote the `settings.REPO_ROOT` variable in
`test__models__Repo__pulse_routing_key_validator`, which would
then cause failures in `test__models__Repo__system_path_validator`,
since the variable we used at test collection time.

Instead, `monkeypatch` over the variable in the Pulse test to
avoid polluting other tests. Also create the path variable inside
the test, instead of at module collection time, to avoid regressing
this issue in the future.
@cgsheeh cgsheeh requested a review from a team as a code owner April 15, 2026 22:01
@github-actions
Copy link
Copy Markdown

View this pull request in Lando to land it once approved.

@cgsheeh cgsheeh requested a review from shtrom April 15, 2026 22:02
@shtrom
Copy link
Copy Markdown
Member

shtrom commented Apr 16, 2026

We previously overwrote the settings.REPO_ROOT variable in test__models__Repo__pulse_routing_key_validator

👍🏼 😬 👍🏼

lando-worker bot pushed a commit that referenced this pull request Apr 16, 2026
…g (Bug 2031725) r=shtrom

We previously overwrote the `settings.REPO_ROOT` variable in
`test__models__Repo__pulse_routing_key_validator`, which would
then cause failures in `test__models__Repo__system_path_validator`,
since the variable we used at test collection time.

Instead, `monkeypatch` over the variable in the Pulse test to
avoid polluting other tests. Also create the path variable inside
the test, instead of at module collection time, to avoid regressing
this issue in the future.

Pull request: #1090
@lando-worker
Copy link
Copy Markdown

lando-worker bot commented Apr 16, 2026

Pull request closed by commit 7d952ae

@lando-worker lando-worker bot closed this Apr 16, 2026
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.

2 participants