File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 4848 go test -count=1 -coverpkg=./processors/... -coverprofile=coverage.out ./tests/...
4949 COVERAGE=$(go tool cover -func=coverage.out | awk '/^total:/ {gsub("%","",$3); print $3}')
5050 echo "Total coverage: ${COVERAGE}%"
51- awk -v c="$COVERAGE" 'BEGIN { if (c+0 < 50 ) { exit 1 } }'
51+ awk -v c="$COVERAGE" 'BEGIN { if (c+0 < 75 ) { exit 1 } }'
5252
5353 - name : GoReleaser config check
5454 if : matrix.os == 'ubuntu-latest'
Original file line number Diff line number Diff line change @@ -60,6 +60,18 @@ func TestMyProcessor_Transform(t *testing.T) {
6060go test -v -race -count=1 ./tests/...
6161```
6262
63+ ## Test Expectations for New Processors
64+
65+ - Add tests that cover:
66+ - normal transform behavior
67+ - at least one error or edge-case path (for example invalid input or missing required flags)
68+ - Keep processor coverage healthy with:
69+
70+ ``` bash
71+ go test -count=1 -coverpkg=./processors/... -coverprofile=coverage.out ./tests/...
72+ go tool cover -func=coverage.out
73+ ```
74+
6375## License
6476
6577By contributing, you agree your contributions will be licensed under the Apache 2.0 License.
You can’t perform that action at this time.
0 commit comments