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 <bradfitz@tailscale.com> Change-Id: If2a90b1d7c5e8f3a6b4d0c9e2a7f5b8d1c4e6a3f
This commit is contained in:
committed by
Brad Fitzpatrick
parent
172124da8c
commit
de0553be66
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user