mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 10:27:46 +08:00
fix test to accept response with HTTP status of 307 and 308 where 302 and 301 are expected
This commit is contained in:
parent
9c15f34967
commit
dd0b107a88
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user