hanahmily opened a new pull request, #1137: URL: https://github.com/apache/skywalking-banyandb/pull/1137
## Summary - The capture writers (`test/cases/measure/cmd/capture/capture_test.go:172` and `cmd/generate/capture.go:168`) wrote `want/*.yaml` directly from `yaml.JSONToYAML(respJSON)` — every regeneration silently stripped the Apache 2.0 license header that `make license-check` requires. Move the `licenseHeader` const out of the `main` package into the importable `test/cases/measure/data` package as `data.LicenseHeader`, and prepend it on every write. - Gate `TestCapture` behind `CAPTURE_WANT_FIXTURES=1`. Routine `./...` discovery (e.g. `make test` run from the `test/` project dir) was silently invoking it and re-baselining the golden fixtures against the current branch's output. With the gate, the test `t.Skip`s in ~10 ms unless explicitly opted in. The new `make capture-test-cases` target sets the env var and runs it; that is now the documented entry point. - Also ignore `.omx/` alongside `.omc/` in `.gitignore` — local scratch dir for OMC/Anthropic tooling artifacts (bench reports, profiler dumps, session logs). ### Why the bug was dormant on `main` CI's test matrix targets `./banyand/...`, `./pkg/...`, and the two integration suites. None of them traverse `./test/cases/...`, so `TestCapture` only runs when a developer explicitly invokes it — or, more dangerously, when `make test` is run from the `test/` project dir and Ginkgo discovers the `gen_*` test cases. The latter is what surfaced this on a feature branch. ## Test plan - [x] `go test -count=1 -v -run TestCapture ./test/cases/measure/cmd/capture/` — `--- SKIP: TestCapture (0.00s)`, no fixture rewrite. - [x] `make capture-test-cases` — runs in ~2.7 s, every produced `want/*.yaml` starts with `# Licensed to Apache Software Foundation`. - [x] `make license-check` — clean for `test/cases/measure/data/want/*.yaml` after regeneration. - [x] `go build ./...` — clean. - [x] `golangci-lint run ./cases/measure/cmd/... ./cases/measure/data/...` (from `test/`) — clean. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
