Page MenuHomeElementl

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

Authored by rexledesma on Jul 23 2021, 8:14 PM.

Details

Reviewers
jordansanders
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)