fix test to accept response with HTTP status of 307 and 308 where 302 and 301 are expected

This commit is contained in:
gammazero 2026-02-10 12:55:48 -10:00
parent 9c15f34967
commit dd0b107a88

View File

@ -215,13 +215,13 @@ func TestGateway(t *testing.T) {
t.Run("GET /webui returns 301 or 302", func(t *testing.T) {
t.Parallel()
resp := node.APIClient().DisableRedirects().Get("/webui")
assert.Contains(t, []int{302, 301}, resp.StatusCode)
assert.Contains(t, []int{302, 301, 307, 308}, resp.StatusCode)
})
t.Run("GET /webui/ returns 301 or 302", func(t *testing.T) {
t.Parallel()
resp := node.APIClient().DisableRedirects().Get("/webui/")
assert.Contains(t, []int{302, 301}, resp.StatusCode)
assert.Contains(t, []int{302, 301, 307, 308}, resp.StatusCode)
})
t.Run("GET /webui/ returns user-specified headers", func(t *testing.T) {