aboutsummaryrefslogtreecommitdiff
path: root/internal/frontend/fetchserver/server_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/frontend/fetchserver/server_test.go')
-rw-r--r--internal/frontend/fetchserver/server_test.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/internal/frontend/fetchserver/server_test.go b/internal/frontend/fetchserver/server_test.go
index 33d31838..23d31bc0 100644
--- a/internal/frontend/fetchserver/server_test.go
+++ b/internal/frontend/fetchserver/server_test.go
@@ -161,6 +161,14 @@ var testModules = []testModule{
name: "http",
suffix: "net/http",
},
+ {
+ name: "boring",
+ suffix: "crypto/internal/boring",
+ },
+ {
+ name: "asan",
+ suffix: "internal/asan",
+ },
},
},
{
@@ -687,6 +695,16 @@ func serverTestCases() []serverTestCase {
wantLocation: "/http@go1.13",
},
{
+ name: "stdlib top-level internal shortcut (internal/asan)",
+ urlPath: "/asan",
+ wantStatusCode: http.StatusNotFound,
+ },
+ {
+ name: "stdlib internal shortcut (crypto/internal/boring)",
+ urlPath: "/boring",
+ wantStatusCode: http.StatusNotFound,
+ },
+ {
name: "package page with trailiing slash",
urlPath: "/github.com/my/module/",
wantStatusCode: http.StatusMovedPermanently,