Page MenuHomeElementl

test: default docker compose fixtures to be module scoped
Needs ReviewPublic

Authored by rexledesma on Jul 23 2021, 8:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 12, 10:55 AM
Unknown Object (File)
Fri, May 12, 12:26 AM
Unknown Object (File)
May 8 2023, 10:37 AM
Unknown Object (File)
May 7 2023, 8:40 PM
Unknown Object (File)
May 1 2023, 3:43 AM
Unknown Object (File)
Apr 30 2023, 9:08 AM
Unknown Object (File)
Apr 22 2023, 1:21 PM
Unknown Object (File)
Mar 31 2023, 4:04 AM
Subscribers
None
This revision needs review, but all specified reviewers are disabled or inactive.

Details

Summary

The setup and teardown for these docker compose fixtures are beefy. They should only be initialized once per module (test file).
It should be the responsibility of the one writing tests to ensure proper cleanup in between tests (e.g. database wiped, queue cleared, etc).

Test Plan

Diff Detail

Repository
R1 dagster
Branch
rl/docker-stuff (branched from master)
Lint
Lint Passed
Unit
No Test Coverage

Event Timeline

I'd like to see it in action - I don't have a great sense of how this actually gets used and adding a test to describe that behavior would be great.

Alternatively, what if we made the these all module scoped by default - and if you want a function scoped one, you can nest the call in a function scoped fixture (since more narrowly scoped fixtures can request more broadly scoped ones - but not the inverse). There's not a particular reason I made these function scoped - just that it's the default behavior.

python_modules/dagster-test/dagster_test/fixtures/docker_compose.py
12

Can you include a test that shows how this is used?

This revision now requires changes to proceed.Jul 23 2021, 9:12 PM
rexledesma retitled this revision from test: allow docker compose fixture to be session scoped to test: default docker compose fixtures to be module scoped.Jul 27 2021, 2:35 PM
rexledesma edited the summary of this revision. (Show Details)