Commit 80b826e
test: raise coverage 79% → 93% for OpenSSF Gold targets (#221)
* test: raise coverage 79% to 93% for OpenSSF Gold targets
Dedicated coverage push (G3, docs/proposals/openssf-best-practices.md):
423 new unit tests across the least-covered modules, all deterministic,
no network, mocked at the same boundaries existing tests use.
Per-module statement coverage:
- cli/main.py 50% -> 99% (94 tests: commands, dcv, keys,
policy rollback, enforce pipeline)
- mcp/server.py 30% -> 98% (100 tests: tool handlers, transports,
policy enforcement, DCV tools)
- core/invoke.py 55% -> 99% (A2A/MCP endpoint resolution, SDK path)
- backends/infoblox/ 53%/70% -> 100%/100% (bloxone incl. Threat Defense,
nios incl. RPZ suite)
- backends/cloud_dns 53% -> 100%, utils/google_auth 21% -> 100%
- cli/init 40% -> 98%, doctor 72% -> 99%, backends/base 73% -> 100%,
backends/__init__ 74% -> 100%, sdk/policy/cel_evaluator 68% -> 98%
Full suite: 2565 passed, 2 skipped (pre-existing live-endpoint skips).
Total: 93% combined statement+branch, 94% statement-only - clears the
Gold 90%/80% bars. Follow-up: ratchet ci.yml --cov-fail-under (added at
78 in #218) to 92 once both PRs land.
Signed-off-by: Ingmar Van Glabbeek <ivanglabbeek@infoblox.com>
* test: resolve CodeQL style alerts in new tests
Single import style per module (importlib.import_module instead of
dual import/import-from), string-form monkeypatch.setattr targets,
and a direct types.ModuleType reference instead of a wrapper lambda.
Signed-off-by: Ingmar Van Glabbeek <ivanglabbeek@infoblox.com>
---------
Signed-off-by: Ingmar Van Glabbeek <ivanglabbeek@infoblox.com>
Co-authored-by: Igor Racic <iracic82@gmail.com>1 parent 03a2c5e commit 80b826e
12 files changed
Lines changed: 6205 additions & 2 deletions
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
675 | 676 | | |
676 | 677 | | |
677 | 678 | | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
0 commit comments