From de0553be66ab1476130059e78d7cb56d43a991c2 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Mon, 20 Jul 2026 17:34:03 +0000 Subject: [PATCH] util/httpm: exempt tempfork from TestUsedConsistently Files under tempfork are vendored copies of upstream code that we want to keep as close to upstream as possible, so don't require them to use httpm constants. An upcoming tempfork/acme sync brings in upstream test files using net/http's method constants. Updates tailscale/corp#45167 Signed-off-by: Brad Fitzpatrick Change-Id: If2a90b1d7c5e8f3a6b4d0c9e2a7f5b8d1c4e6a3f --- util/httpm/httpm_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/util/httpm/httpm_test.go b/util/httpm/httpm_test.go index e8342a74f..a381c55d2 100644 --- a/util/httpm/httpm_test.go +++ b/util/httpm/httpm_test.go @@ -35,6 +35,12 @@ func TestUsedConsistently(t *testing.T) { cmd.Dir = rootDir matches, _ := cmd.Output() for fn := range strings.SplitSeq(strings.TrimSpace(string(matches)), "\n") { + if strings.HasPrefix(fn, "tempfork/") { + // Files under tempfork are vendored copies of upstream + // code that we want to keep as close to upstream as + // possible, so don't hold them to this rule. + continue + } switch fn { case "util/httpm/httpm.go", "util/httpm/httpm_test.go": continue