aboutsummaryrefslogtreecommitdiff
path: root/src/net/http/fs_test.go
diff options
context:
space:
mode:
authorNicholas S. Husin <nsh@golang.org>2026-03-30 19:17:03 -0400
committerNicholas Husin <nsh@golang.org>2026-04-10 14:18:34 -0700
commitccf4ba99a90f6f1366daef776ae90187c9f3c6b1 (patch)
tree379004141a9699a153e5555dc0721779513d74ef /src/net/http/fs_test.go
parent6299ca285a0a6bf7d2b1bfbb03b6c3288b846bdf (diff)
downloadgo-ccf4ba99a90f6f1366daef776ae90187c9f3c6b1.tar.xz
net/http: run tests for HTTP/3 where it can already pass
By default, our test harnesses (run and runSynctest) now use http3Mode, in addition to http1Mode and http2Mode, when no []testMode were explicitly defined for a given test. Tests that cannot currently pass for HTTP/3 have been modified to use http3SkippedMode, which serves as a convenient alias for the old default of []testMode{http1Mode, http2Mode}. We changed the default mode and defined http3SkippedMode so we have a clear list of TODOs in terms of how much changes are still needed before our HTTP/3 implementation reaches basic feature parity with HTTP/1 and HTTP/2. For #70914 Change-Id: I719d5d66399a51f7c3d96180ebed9b606a6a6964 Reviewed-on: https://go-review.googlesource.com/c/go/+/765320 Reviewed-by: Damien Neil <dneil@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Nicholas Husin <husin@google.com>
Diffstat (limited to 'src/net/http/fs_test.go')
-rw-r--r--src/net/http/fs_test.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/net/http/fs_test.go b/src/net/http/fs_test.go
index 32fb696fee..2dc03e13ff 100644
--- a/src/net/http/fs_test.go
+++ b/src/net/http/fs_test.go
@@ -709,7 +709,7 @@ func testServeIndexHtmlFS(t *testing.T, mode testMode) {
}
}
-func TestFileServerZeroByte(t *testing.T) { run(t, testFileServerZeroByte) }
+func TestFileServerZeroByte(t *testing.T) { run(t, testFileServerZeroByte, http3SkippedMode) }
func testFileServerZeroByte(t *testing.T, mode testMode) {
ts := newClientServerTest(t, mode, FileServer(Dir("."))).ts
@@ -842,7 +842,10 @@ func (fsys fakeFS) Open(name string) (File, error) {
return &fakeFile{ReadSeeker: strings.NewReader(f.contents), fi: f, path: name}, nil
}
-func TestDirectoryIfNotModified(t *testing.T) { run(t, testDirectoryIfNotModified) }
+func TestDirectoryIfNotModified(t *testing.T) {
+ // HTTP/3 trips off race detector.
+ run(t, testDirectoryIfNotModified, http3SkippedMode)
+}
func testDirectoryIfNotModified(t *testing.T, mode testMode) {
const indexContents = "I am a fake index.html file"
fileMod := time.Unix(1000000000, 0).UTC()
@@ -916,7 +919,10 @@ func mustStat(t *testing.T, fileName string) fs.FileInfo {
return fi
}
-func TestServeContent(t *testing.T) { run(t, testServeContent) }
+func TestServeContent(t *testing.T) {
+ // HTTP/3 trips off race detector.
+ run(t, testServeContent, http3SkippedMode)
+}
func testServeContent(t *testing.T, mode testMode) {
type serveParam struct {
name string