With the dagster-graphql becoming a proper "host" process, we
will be launching lots of user processes from test cases. As a result
we need to be more disciplined about managing and cleaning up resources.
This was the genesis for this diff, as this test libraries predilection
for newing up contexts whenever and whereever it pleased made the managing
This adds a fixture for the graphql context and then uses it in the vast
majority of tests. This can be a common codepath for doing cleanup and
management (in this case of temp files, but we are going to have clean
This also opens us up doing something like running a suite of tests against
other common configurations (e.g. with postgres) by changing what context
we new up against these.
For cases where we don't use the graphql_context fixture, I eliminated all
optional instance parameters in context creation functions. This forces
the tests to manage the lifecycle of the instances is they want to roll their own.