Skip to content

Commit

Permalink
use build functions
Browse files Browse the repository at this point in the history
  • Loading branch information
dliu27 committed Dec 7, 2024
1 parent 8f73433 commit 7dc2066
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ import {
RunStatus,
buildDryRunInstigationTick,
buildErrorChainLink,
buildLaunchMultipleRunsResult,
buildLaunchRunSuccess,
buildPipelineSnapshot,
buildPipelineTag,
buildPythonError,
buildRun,
buildRunRequest,
buildSchedule,
buildTickEvaluation,
Expand Down Expand Up @@ -211,18 +215,14 @@ export const ScheduleLaunchAllMutation: MockedResponse<LaunchMultipleRunsMutatio
result: {
data: {
__typename: 'Mutation',
launchMultipleRuns: {
__typename: 'LaunchMultipleRunsResult',
launchMultipleRuns: buildLaunchMultipleRunsResult({
launchMultipleRunsResult: [
{
__typename: 'LaunchRunSuccess',
run: {
__typename: 'Run',
buildLaunchRunSuccess({
run: buildRun({
id: '504b3a77-d6c4-440c-a128-7f59c9d75d59',
pipeline: {
__typename: 'PipelineSnapshot',
pipeline: buildPipelineSnapshot({
name: 'saepe',
},
}),
tags: [
buildPipelineTag({
key: 'dagster/schedule_name',
Expand All @@ -246,10 +246,10 @@ export const ScheduleLaunchAllMutation: MockedResponse<LaunchMultipleRunsMutatio
'ops:\n configurable_op:\n config:\n scheduled_date: 2023-01-29',
mode: 'default',
resolvedOpSelection: null,
},
},
}),
}),
],
},
}),
},
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ import {
buildDryRunInstigationTick,
buildErrorChainLink,
buildInstigationState,
buildLaunchMultipleRunsResult,
buildLaunchRunSuccess,
buildPipelineSnapshot,
buildPipelineTag,
buildPythonError,
buildRun,
buildRunRequest,
buildSensor,
buildSensorData,
Expand Down Expand Up @@ -267,18 +271,16 @@ export const SensorLaunchAllMutation: MockedResponse<LaunchMultipleRunsMutation>
result: {
data: {
__typename: 'Mutation',
launchMultipleRuns: {
__typename: 'LaunchMultipleRunsResult',
launchMultipleRuns: buildLaunchMultipleRunsResult({
launchMultipleRunsResult: [
{
buildLaunchRunSuccess({
__typename: 'LaunchRunSuccess',
run: {
run: buildRun({
__typename: 'Run',
id: '504b3a77-d6c4-440c-a128-7f59c9d75d59',
pipeline: {
__typename: 'PipelineSnapshot',
pipeline: buildPipelineSnapshot({
name: 'saepe',
},
}),
tags: [
buildPipelineTag({key: 'dagster2', value: 'test'}),
buildPipelineTag({key: 'marco2', value: 'salazar2'}),
Expand All @@ -288,17 +290,16 @@ export const SensorLaunchAllMutation: MockedResponse<LaunchMultipleRunsMutation>
'solids:\n read_file:\n config:\n directory: /Users/marcosalazar/code/dagster/js_modules/dagster-ui/packages/ui-core/src/ticks/tests\n filename: DryRunRequestTable.test.tsx\n',
mode: 'default',
resolvedOpSelection: null,
},
},
{
}),
}),
buildLaunchRunSuccess({
__typename: 'LaunchRunSuccess',
run: {
run: buildRun({
__typename: 'Run',
id: '6745cd03-3d89-4fd2-a41f-6b9d9ffdc134',
pipeline: {
__typename: 'PipelineSnapshot',
pipeline: buildPipelineSnapshot({
name: 'saepe',
},
}),
tags: [
buildPipelineTag({key: 'dagster3', value: 'test'}),
buildPipelineTag({key: 'marco3', value: 'salazar3'}),
Expand All @@ -307,20 +308,16 @@ export const SensorLaunchAllMutation: MockedResponse<LaunchMultipleRunsMutation>
status: RunStatus.QUEUED,
runConfigYaml:
'solids:\n read_file:\n config:\n directory: /Users/marcosalazar/code/dagster/js_modules/dagster-ui/packages/ui-core/src/ticks/tests\n filename: DryRunRequestTable.test.tsx\n',

mode: 'default',
resolvedOpSelection: null,
},
},
{
__typename: 'LaunchRunSuccess',
run: {
__typename: 'Run',
}),
}),
buildLaunchRunSuccess({
run: buildRun({
id: '7ed35f69-42cf-4518-84a4-c97d0551a56b',
pipeline: {
__typename: 'PipelineSnapshot',
pipeline: buildPipelineSnapshot({
name: 'simple_config_job',
},
}),
tags: [
buildPipelineTag({key: 'dagster6', value: 'test'}),
buildPipelineTag({key: 'marco6', value: 'salazar6'}),
Expand All @@ -331,10 +328,10 @@ export const SensorLaunchAllMutation: MockedResponse<LaunchMultipleRunsMutation>

mode: 'default',
resolvedOpSelection: null,
},
},
}),
}),
],
},
}),
},
},
};

0 comments on commit 7dc2066

Please sign in to comment.