File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
tests/integration/assessment Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -34,3 +34,18 @@ def test_migration_sequencing_job_with_task_referencing_cluster(
3434 steps = runtime_ctx .migration_sequencer .generate_steps ()
3535 step_object_types = [step .object_type for step in steps ]
3636 assert step_object_types == ["CLUSTER" , "TASK" , "JOB" ]
37+
38+
39+ def test_migration_sequencing_job_with_task_referencing_non_existing_cluster (runtime_ctx ) -> None :
40+ """Sequence a job with a task referencing existing cluster"""
41+ # Cannot make an actual job referencing a non-exsting cluster
42+ task = jobs .Task (task_key = "test-task" , existing_cluster_id = "non-existing-id" )
43+ settings = jobs .JobSettings (name = "test-job" , tasks = [task ])
44+ job = jobs .Job (job_id = 1234 , settings = settings )
45+
46+ maybe_job_node = runtime_ctx .migration_sequencer .register_job (job )
47+ assert maybe_job_node .failed
48+
49+ steps = runtime_ctx .migration_sequencer .generate_steps ()
50+ step_object_types = [step .object_type for step in steps ]
51+ assert step_object_types == ["CLUSTER" , "TASK" , "JOB" ] # TODO: What do we expect?
You can’t perform that action at this time.
0 commit comments