Commit 399ff7e
authored
fix: don't close old findings when reimport auto-creates a new test (#14396)
* fix: don't close old findings when reimport auto-creates a new test
When auto_create_context=True and the test doesn't exist yet, the reimport
falls back to DefaultImporter. With close_old_findings=True, this would
incorrectly close findings from other tests in the same engagement/product
scope because the newly created test has no prior findings to compare against.
Suppress close_old_findings for this initial-import path. Fixes #14363.
* test: regression test for #14363 via API serializer path
Add test_reimport_auto_create_does_not_close_findings_in_existing_test to
ImportReimportTestAPI. It calls the reimport endpoint with
auto_create_context=True and close_old_findings=True targeting a non-existing
test title, verifying that the existing test's findings are not closed when
the endpoint auto-creates a new test. This test would fail if the
close_old_findings=False override in the serializer were reverted.1 parent ebe181e commit 399ff7e
2 files changed
Lines changed: 61 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2711 | 2711 | | |
2712 | 2712 | | |
2713 | 2713 | | |
| 2714 | + | |
| 2715 | + | |
| 2716 | + | |
2714 | 2717 | | |
2715 | | - | |
| 2718 | + | |
2716 | 2719 | | |
2717 | 2720 | | |
2718 | 2721 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2582 | 2582 | | |
2583 | 2583 | | |
2584 | 2584 | | |
| 2585 | + | |
| 2586 | + | |
| 2587 | + | |
| 2588 | + | |
| 2589 | + | |
| 2590 | + | |
| 2591 | + | |
| 2592 | + | |
| 2593 | + | |
| 2594 | + | |
| 2595 | + | |
| 2596 | + | |
| 2597 | + | |
| 2598 | + | |
| 2599 | + | |
| 2600 | + | |
| 2601 | + | |
| 2602 | + | |
| 2603 | + | |
| 2604 | + | |
| 2605 | + | |
| 2606 | + | |
| 2607 | + | |
| 2608 | + | |
| 2609 | + | |
| 2610 | + | |
| 2611 | + | |
| 2612 | + | |
| 2613 | + | |
| 2614 | + | |
| 2615 | + | |
| 2616 | + | |
| 2617 | + | |
| 2618 | + | |
| 2619 | + | |
| 2620 | + | |
| 2621 | + | |
| 2622 | + | |
| 2623 | + | |
| 2624 | + | |
| 2625 | + | |
| 2626 | + | |
| 2627 | + | |
| 2628 | + | |
| 2629 | + | |
| 2630 | + | |
| 2631 | + | |
| 2632 | + | |
| 2633 | + | |
| 2634 | + | |
| 2635 | + | |
| 2636 | + | |
| 2637 | + | |
| 2638 | + | |
| 2639 | + | |
| 2640 | + | |
| 2641 | + | |
2585 | 2642 | | |
2586 | 2643 | | |
2587 | 2644 | | |
| |||
0 commit comments