5
5
from tests .config import TEST_PROJECT_ID
6
6
from tests .wapi_adapter import UnitTestWorkflowAPIAdapter
7
7
8
+ _I_ID : str = "instance-00000000-0000-0000-0000-000000000000"
9
+
8
10
9
11
def test_get_nop_job ():
10
12
# Arrange
@@ -177,7 +179,7 @@ def test_create_running_workflow_step():
177
179
178
180
# Act
179
181
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
181
183
)
182
184
183
185
# Assert
@@ -195,7 +197,7 @@ def test_set_running_workflow_step_variables():
195
197
variables = {},
196
198
)
197
199
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
199
201
)
200
202
rwfsid = response ["id" ]
201
203
@@ -220,7 +222,7 @@ def test_set_running_workflow_step_done_when_success():
220
222
variables = {},
221
223
)
222
224
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
224
226
)
225
227
rwfsid = response ["id" ]
226
228
@@ -247,7 +249,7 @@ def test_set_running_workflow_step_done_when_failed():
247
249
variables = {},
248
250
)
249
251
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
251
253
)
252
254
rwfsid = response ["id" ]
253
255
@@ -277,7 +279,7 @@ def test_get_running_workflow_step():
277
279
)
278
280
rwfid = response ["id" ]
279
281
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
281
283
)
282
284
rwfsid = response ["id" ]
283
285
@@ -306,7 +308,7 @@ def test_get_running_workflow_step_with_prior_step():
306
308
response , _ = utaa .create_running_workflow_step (
307
309
running_workflow_id = rwfid ,
308
310
step = "step-1" ,
309
- prior_running_workflow_step_id = "r-workflow-step-111" ,
311
+ instance_id = _I_ID ,
310
312
)
311
313
rwfsid = response ["id" ]
312
314
@@ -317,8 +319,6 @@ def test_get_running_workflow_step_with_prior_step():
317
319
assert response ["name" ] == "step-1"
318
320
assert not response ["done" ]
319
321
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"
322
322
323
323
324
324
def test_create_instance ():
@@ -332,7 +332,7 @@ def test_create_instance():
332
332
variables = {},
333
333
)
334
334
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
336
336
)
337
337
rwfs_id = response ["id" ]
338
338
@@ -354,7 +354,7 @@ def test_create_and_get_instance():
354
354
variables = {},
355
355
)
356
356
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
358
358
)
359
359
rwfs_id = response ["id" ]
360
360
response = utaa .create_instance (running_workflow_step_id = rwfs_id )
@@ -378,7 +378,7 @@ def test_create_instance_and_get_step_instance_directory():
378
378
variables = {},
379
379
)
380
380
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
382
382
)
383
383
rwfs_id = response ["id" ]
384
384
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():
405
405
)
406
406
rwf_id = response ["id" ]
407
407
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
409
409
)
410
410
rwfs_id = response ["id" ]
411
411
response = utaa .create_instance (running_workflow_step_id = rwfs_id )
@@ -438,7 +438,7 @@ def test_get_running_workflow_step_by_name():
438
438
)
439
439
rwf_id = response ["id" ]
440
440
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
442
442
)
443
443
rwfs_id = response ["id" ]
444
444
@@ -464,7 +464,7 @@ def test_mock_get_running_workflow_step_output_values_for_output():
464
464
variables = {},
465
465
)
466
466
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
468
468
)
469
469
470
470
# Act
@@ -494,7 +494,7 @@ def test_basic_get_running_workflow_step_output_values_for_output_when_step_vari
494
494
variables = {},
495
495
)
496
496
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
498
498
)
499
499
500
500
# Act
0 commit comments