Skip to content

Commit 3a4c7c2

Browse files
committed
Add per-directory codecov coverage targets
The osapi/ package contains ~194k lines of generated code covering every API in the OpenSearch spec. Coverage sits at ~25% because many generated APIs target plugin-specific endpoints (ISM, anomaly detection, k-NN, security, notifications) that require plugins not present in the CI cluster. Unit-level roundtrip tests exercise request construction and dispatch for all 167 APIs, but full response parsing coverage requires integration tests against a cluster with the relevant plugins enabled. Expanding the CI cluster configuration and adding plugin-aware integration tests would raise this target over time. Component-level targets: core (transport, utils, signer): 80% - mature, hand-written code internal/path: 95% - small, fully testable osapi: 25% - limited by CI plugin set opensearchapi (legacy): 14% - frozen, being replaced Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>
1 parent cd061db commit 3a4c7c2

1 file changed

Lines changed: 25 additions & 1 deletion

File tree

.codecov.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,29 @@ coverage:
1111
status:
1212
project:
1313
default:
14-
threshold: 5% # allow 5% coverage decrease
14+
target: auto
15+
threshold: 5%
16+
core:
17+
paths:
18+
- "opensearch*.go"
19+
- "opensearchtransport/"
20+
- "opensearchutil/"
21+
- "signer/"
22+
target: 80%
23+
threshold: 2%
24+
path:
25+
paths:
26+
- "internal/path/"
27+
target: 95%
28+
threshold: 2%
29+
osapi:
30+
paths:
31+
- "osapi/"
32+
target: 25%
33+
threshold: 5%
34+
opensearchapi:
35+
paths:
36+
- "opensearchapi/"
37+
target: 14%
38+
threshold: 2%
1539
patch: off

0 commit comments

Comments
 (0)