forked from dagster-io/dagster
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gql for pausing asset daemon (dagster-io#13560)
Accidentally landed dagster-io#13551 in to the upstream branch
- Loading branch information
Showing
6 changed files
with
122 additions
and
6 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
python_modules/dagster-graphql/dagster_graphql_tests/graphql/test_auto_materialize_paused.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
from dagster_graphql.test.utils import execute_dagster_graphql | ||
|
||
from dagster_graphql_tests.graphql.graphql_context_test_suite import ( | ||
ExecutingGraphQLContextTestMatrix, | ||
) | ||
|
||
MUTATION = """ | ||
mutation SetAutoMaterializePausedMutation($paused: Boolean!) { | ||
setAutoMaterializePaused(paused: $paused) | ||
} | ||
""" | ||
|
||
QUERY = """ | ||
query GetAutoMaterializePausedQuery { | ||
instance { | ||
autoMaterializePaused | ||
} | ||
} | ||
""" | ||
|
||
|
||
class TestDaemonHealth(ExecutingGraphQLContextTestMatrix): | ||
def test_get_individual_daemons(self, graphql_context): | ||
results = execute_dagster_graphql(graphql_context, QUERY) | ||
assert results.data == { | ||
"instance": { | ||
"autoMaterializePaused": False, | ||
} | ||
} | ||
|
||
results = execute_dagster_graphql(graphql_context, MUTATION, variables={"paused": True}) | ||
assert results.data == { | ||
"setAutoMaterializePaused": True, | ||
} | ||
|
||
results = execute_dagster_graphql(graphql_context, QUERY) | ||
assert results.data == { | ||
"instance": { | ||
"autoMaterializePaused": True, | ||
} | ||
} | ||
|
||
results = execute_dagster_graphql(graphql_context, MUTATION, variables={"paused": False}) | ||
assert results.data == { | ||
"setAutoMaterializePaused": False, | ||
} | ||
|
||
results = execute_dagster_graphql(graphql_context, QUERY) | ||
assert results.data == { | ||
"instance": { | ||
"autoMaterializePaused": False, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters