Differential D4837 Diff 24279 python_modules/dagster-graphql/dagster_graphql_tests/graphql/test_triggers.py
Changeset View
Changeset View
Standalone View
Standalone View
python_modules/dagster-graphql/dagster_graphql_tests/graphql/test_triggers.py
from dagster_graphql.client.query import LAUNCH_TRIGGERED_EXECUTION | from dagster_graphql.client.query import LAUNCH_TRIGGERED_EXECUTION | ||||
from dagster_graphql.test.utils import execute_dagster_graphql, infer_repository_selector | from dagster_graphql.test.utils import execute_dagster_graphql, infer_repository_selector | ||||
from .graphql_context_test_suite import OutOfProcessExecutingGraphQLContextTestMatrix | from .graphql_context_test_suite import OutOfProcessExecutingGraphQLContextTestMatrix | ||||
class TestTriggerRuns(OutOfProcessExecutingGraphQLContextTestMatrix): | class TestTriggerRuns(OutOfProcessExecutingGraphQLContextTestMatrix): | ||||
def test_get_partition_runs(self, graphql_context): | def test_get_partition_runs(self, graphql_context): | ||||
repository_selector = infer_repository_selector(graphql_context) | repository_selector = infer_repository_selector(graphql_context) | ||||
result = execute_dagster_graphql( | result = execute_dagster_graphql( | ||||
graphql_context, | graphql_context, | ||||
LAUNCH_TRIGGERED_EXECUTION, | LAUNCH_TRIGGERED_EXECUTION, | ||||
variables={ | variables={ | ||||
"triggerSelector": { | "triggerSelector": { | ||||
"repositoryName": repository_selector["repositoryName"], | "repositoryName": repository_selector["repositoryName"], | ||||
"repositoryLocationName": repository_selector["repositoryLocationName"], | "repositoryLocationName": repository_selector["repositoryLocationName"], | ||||
"executableName": "executable_no_config", | "jobName": "job_no_config", | ||||
} | } | ||||
}, | }, | ||||
) | ) | ||||
assert not result.errors | assert not result.errors | ||||
assert result.data["triggerExecution"]["__typename"] == "TriggerExecutionSuccess" | assert result.data["triggerExecution"]["__typename"] == "TriggerExecutionSuccess" | ||||
assert len(result.data["triggerExecution"]["launchedRunIds"]) == 1 | assert len(result.data["triggerExecution"]["launchedRunIds"]) == 1 |