Add the ETSI config test that .gitignore swallowed - #160
Merged
Merged
Conversation
#159 described a test asserting every ETSI field is carried into the registry config. The test was written and passing locally, and it is not in the repository: .gitignore's third line was an unanchored `gt`, which matches the cmd/gt *directory* as well as the built binary, so `git add -A` skipped the new file without a word and the commit looked complete. Anchors those patterns to the repository root so cmd/gt is tracked normally, and adds the missing test. Reverting #159's mapping fails it on all five fields it restored. The same shape as the bug #159 fixed, one level up: a dropped thing produces silence rather than an error, so nothing looks wrong until something downstream is missing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DWj5aAxqWjEm5ESCX4P1hk
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The change is low-risk and directly addresses the stated issue by fixing the ignore pattern and adding focused tests that validate the intended ETSI config mapping behavior.
Pull request overview
This PR prevents cmd/gt/ from being accidentally ignored by Git and adds the previously-missing ETSI config mapping tests that ensure all ETSI fields are carried into the ETSI TSL registry configuration.
Changes:
- Anchor previously-unanchored
.gitignorebinary patterns (e.g.,gt) to the repository root to avoid ignoringcmd/gt/. - Add
cmd/gt/etsi_config_test.goto assert ETSI config-to-registry mapping carries every configured field, covers name/description defaults, and validates unparseablefetch_timeouthandling.
File summaries
| File | Description |
|---|---|
| cmd/gt/etsi_config_test.go | Adds regression tests for etsiTSLConfig to ensure all ETSI config fields are mapped and defaulting/timeout parsing behave as intended. |
| .gitignore | Anchors binary/output ignore patterns to repo root to prevent silently ignoring the cmd/gt/ directory tree. |
Review details
- Files reviewed: 1/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What
#159 described a test asserting that every ETSI field is carried into the registry config. The test was written and passing locally, and it is not in the repository.
.gitignore's third line was an unanchoredgt:Git patterns without a slash match at any depth, so
gtexcludescmd/gt/wholesale.main.gostill showed changes because it was already tracked, butgit add -Askipped the new test file without a word and the commit looked complete.This anchors the binary patterns to the repository root and adds the missing test. Reverting #159's mapping fails it on all five fields it restored:
cmd/gt/etsi_config_test.gowas the only file being hidden — checked withgit status --ignored.Same shape as the bug it tests
#159 fixed a mapping that dropped fields into their zero values, producing silence rather than an error. This is that one level up: an ignored file produces no diagnostic either, so the commit, the PR diff and the merge all looked right.
🤖 Generated with Claude Code
https://claude.ai/code/session_01DWj5aAxqWjEm5ESCX4P1hk