@@ -1385,7 +1385,8 @@ def test_reverted_activity_status(runner, project, with_injection):
1385
1385
write_and_commit_file (project .repository , input , "content" )
1386
1386
output = project .path / "output"
1387
1387
1388
- assert 0 == runner .invoke (cli , ["run" , "cat" , input ], stdout = output ).exit_code
1388
+ result = runner .invoke (cli , ["run" , "cat" , input ], stdout = output )
1389
+ assert 0 == result .exit_code , format_result_exception (result )
1389
1390
write_and_commit_file (project .repository , input , "changes" )
1390
1391
1391
1392
with with_injection ():
@@ -1409,3 +1410,33 @@ def test_reverted_activity_status(runner, project, with_injection):
1409
1410
assert activity_id not in runner .invoke (cli , ["log" ]).output
1410
1411
assert "input" not in runner .invoke (cli , ["workflow" , "inputs" ]).output
1411
1412
assert "output" not in runner .invoke (cli , ["workflow" , "outputs" ]).output
1413
+
1414
+
1415
+ def test_rerun_doesnt_update_plan_index (runner , project , with_injection ):
1416
+ """Test that a rerun does not update the plan index."""
1417
+ input = project .path / "input"
1418
+ write_and_commit_file (project .repository , input , "content" )
1419
+ output = project .path / "output"
1420
+
1421
+ original_description = "1111111111111111"
1422
+ result = runner .invoke (
1423
+ cli , ["run" , "--name" , "my-workflow" , "--description" , original_description , "cat" , input ], stdout = output
1424
+ )
1425
+ assert 0 == result .exit_code , format_result_exception (result )
1426
+
1427
+ new_description = "22222222222222222"
1428
+ result = runner .invoke (cli , ["workflow" , "edit" , "my-workflow" , "--description" , new_description ])
1429
+ assert 0 == result .exit_code , format_result_exception (result )
1430
+
1431
+ result = runner .invoke (cli , ["workflow" , "show" , "my-workflow" ])
1432
+ assert 0 == result .exit_code , format_result_exception (result )
1433
+ assert new_description in result .output
1434
+ assert original_description not in result .output
1435
+
1436
+ result = runner .invoke (cli , ["rerun" , output ])
1437
+ assert 0 == result .exit_code , format_result_exception (result )
1438
+
1439
+ result = runner .invoke (cli , ["workflow" , "show" , "my-workflow" ])
1440
+ assert 0 == result .exit_code , format_result_exception (result )
1441
+ assert new_description in result .output
1442
+ assert original_description not in result .output
0 commit comments