55from tests .config import TEST_PROJECT_ID
66from tests .wapi_adapter import UnitTestWorkflowAPIAdapter
77
8+ _I_ID : str = "instance-00000000-0000-0000-0000-000000000000"
9+
810
911def test_get_nop_job ():
1012 # Arrange
@@ -177,7 +179,7 @@ def test_create_running_workflow_step():
177179
178180 # Act
179181 response , _ = utaa .create_running_workflow_step (
180- running_workflow_id = response ["id" ], step = "step-1"
182+ running_workflow_id = response ["id" ], step = "step-1" , instance_id = _I_ID
181183 )
182184
183185 # Assert
@@ -195,7 +197,7 @@ def test_set_running_workflow_step_variables():
195197 variables = {},
196198 )
197199 response , _ = utaa .create_running_workflow_step (
198- running_workflow_id = response ["id" ], step = "step-1"
200+ running_workflow_id = response ["id" ], step = "step-1" , instance_id = _I_ID
199201 )
200202 rwfsid = response ["id" ]
201203
@@ -220,7 +222,7 @@ def test_set_running_workflow_step_done_when_success():
220222 variables = {},
221223 )
222224 response , _ = utaa .create_running_workflow_step (
223- running_workflow_id = response ["id" ], step = "step-1"
225+ running_workflow_id = response ["id" ], step = "step-1" , instance_id = _I_ID
224226 )
225227 rwfsid = response ["id" ]
226228
@@ -247,7 +249,7 @@ def test_set_running_workflow_step_done_when_failed():
247249 variables = {},
248250 )
249251 response , _ = utaa .create_running_workflow_step (
250- running_workflow_id = response ["id" ], step = "step-1"
252+ running_workflow_id = response ["id" ], step = "step-1" , instance_id = _I_ID
251253 )
252254 rwfsid = response ["id" ]
253255
@@ -277,7 +279,7 @@ def test_get_running_workflow_step():
277279 )
278280 rwfid = response ["id" ]
279281 response , _ = utaa .create_running_workflow_step (
280- running_workflow_id = rwfid , step = "step-1"
282+ running_workflow_id = rwfid , step = "step-1" , instance_id = _I_ID
281283 )
282284 rwfsid = response ["id" ]
283285
@@ -306,7 +308,7 @@ def test_get_running_workflow_step_with_prior_step():
306308 response , _ = utaa .create_running_workflow_step (
307309 running_workflow_id = rwfid ,
308310 step = "step-1" ,
309- prior_running_workflow_step_id = "r-workflow-step-111" ,
311+ instance_id = _I_ID ,
310312 )
311313 rwfsid = response ["id" ]
312314
@@ -317,8 +319,6 @@ def test_get_running_workflow_step_with_prior_step():
317319 assert response ["name" ] == "step-1"
318320 assert not response ["done" ]
319321 assert response ["running_workflow" ]["id" ] == rwfid
320- assert "prior_running_workflow_step" in response
321- assert response ["prior_running_workflow_step" ]["id" ] == "r-workflow-step-111"
322322
323323
324324def test_create_instance ():
@@ -332,7 +332,7 @@ def test_create_instance():
332332 variables = {},
333333 )
334334 response , _ = utaa .create_running_workflow_step (
335- running_workflow_id = response ["id" ], step = "step-1"
335+ running_workflow_id = response ["id" ], step = "step-1" , instance_id = _I_ID
336336 )
337337 rwfs_id = response ["id" ]
338338
@@ -354,7 +354,7 @@ def test_create_and_get_instance():
354354 variables = {},
355355 )
356356 response , _ = utaa .create_running_workflow_step (
357- running_workflow_id = response ["id" ], step = "step-1"
357+ running_workflow_id = response ["id" ], step = "step-1" , instance_id = _I_ID
358358 )
359359 rwfs_id = response ["id" ]
360360 response = utaa .create_instance (running_workflow_step_id = rwfs_id )
@@ -378,7 +378,7 @@ def test_create_instance_and_get_step_instance_directory():
378378 variables = {},
379379 )
380380 response , _ = utaa .create_running_workflow_step (
381- running_workflow_id = response ["id" ], step = "step-1"
381+ running_workflow_id = response ["id" ], step = "step-1" , instance_id = _I_ID
382382 )
383383 rwfs_id = response ["id" ]
384384 response = utaa .create_instance (running_workflow_step_id = rwfs_id )
@@ -405,7 +405,7 @@ def test_create_instance_and_get_step_instance_directory_by_name():
405405 )
406406 rwf_id = response ["id" ]
407407 response , _ = utaa .create_running_workflow_step (
408- running_workflow_id = rwf_id , step = "step-1"
408+ running_workflow_id = rwf_id , step = "step-1" , instance_id = _I_ID
409409 )
410410 rwfs_id = response ["id" ]
411411 response = utaa .create_instance (running_workflow_step_id = rwfs_id )
@@ -438,7 +438,7 @@ def test_get_running_workflow_step_by_name():
438438 )
439439 rwf_id = response ["id" ]
440440 response , _ = utaa .create_running_workflow_step (
441- running_workflow_id = rwf_id , step = "step-2"
441+ running_workflow_id = rwf_id , step = "step-2" , instance_id = _I_ID
442442 )
443443 rwfs_id = response ["id" ]
444444
@@ -464,7 +464,7 @@ def test_mock_get_running_workflow_step_output_values_for_output():
464464 variables = {},
465465 )
466466 response , _ = utaa .create_running_workflow_step (
467- running_workflow_id = response ["id" ], step = "step-1"
467+ running_workflow_id = response ["id" ], step = "step-1" , instance_id = _I_ID
468468 )
469469
470470 # Act
@@ -494,7 +494,7 @@ def test_basic_get_running_workflow_step_output_values_for_output_when_step_vari
494494 variables = {},
495495 )
496496 response , _ = utaa .create_running_workflow_step (
497- running_workflow_id = response ["id" ], step = "step-1"
497+ running_workflow_id = response ["id" ], step = "step-1" , instance_id = _I_ID
498498 )
499499
500500 # Act
0 commit comments