TestCommitUUIDEmpty guards the empty-input branch. The buf client never sends an empty commit id, but the proxy might compute one when an upstream returns an empty SHA. Returning "" (rather than a zero-UUID) keeps the empty case distinguishable in logs and avoids poisoning the commitMap with a junk
(t *testing.T)
| 89 | // zero-UUID) keeps the empty case distinguishable in logs and avoids |
| 90 | // poisoning the commitMap with a junk key. |
| 91 | func TestCommitUUIDEmpty(t *testing.T) { |
| 92 | if got := commitUUID(""); got != "" { |
| 93 | t.Fatalf("commitUUID(\"\") = %q, want \"\"", got) |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | // TestCommitUUIDNoLeadingZeroStrip guards against a "feature" where |
| 98 | // hex.EncodeToString might be replaced with a printer that drops |
nothing calls this directly
no test coverage detected