RatneshVaibhav opened a new issue, #761:
URL: https://github.com/apache/airavata/issues/761

   On Go 1.26, `go test ./internal/server` fails:
   
   ```
   dashboard_test.go:90: GET /dashboard = 307 to "/dashboard/", want 301 to 
/dashboard/
   ```
   
   Go 1.26 changed `ServeMux` trailing-slash redirects from 301 to 307
   (https://go.dev/doc/go1.26, net/http section). The test hard-codes 301.
   CI passes because `setup-go` uses the version from `go.mod` (1.25), but
   INSTALL.md lists "Go 1.25+", so anyone building with current Go gets a
   failing test suite.
   
   **Reproduce**
   ```
   GOTOOLCHAIN=go1.25.0 go test -run TestRootRedirectsToDashboard 
./internal/server   # ok
   GOTOOLCHAIN=go1.26.0 go test -run TestRootRedirectsToDashboard 
./internal/server   # FAIL
   ```
   
   The server itself behaves correctly either way, since clients follow both
   301 and 307. Proposed fix: have the test accept either status, so it
   checks that `/dashboard` redirects to `/dashboard/` rather than a
   Go-version-specific code. I'll open a PR.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to