mirror of
https://github.com/gofiber/fiber.git
synced 2025-05-31 11:52:41 +00:00
🩹 remove invalid test
This commit is contained in:
parent
0d3d6d9fe8
commit
f4e40a7224
@ -3,7 +3,6 @@ package proxy
|
|||||||
import (
|
import (
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"strings"
|
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@ -64,21 +63,6 @@ func Test_Proxy(t *testing.T) {
|
|||||||
utils.AssertEqual(t, fiber.StatusTeapot, resp.StatusCode)
|
utils.AssertEqual(t, fiber.StatusTeapot, resp.StatusCode)
|
||||||
}
|
}
|
||||||
|
|
||||||
// go test -run Test_Proxy_Do_With_Error
|
|
||||||
func Test_Proxy_Do_With_Error(t *testing.T) {
|
|
||||||
app := fiber.New()
|
|
||||||
|
|
||||||
app.Use(Balancer(Config{Servers: []string{"127.0.0.1:90000"}}))
|
|
||||||
|
|
||||||
resp, err := app.Test(httptest.NewRequest("GET", "/", nil))
|
|
||||||
utils.AssertEqual(t, nil, err)
|
|
||||||
utils.AssertEqual(t, fiber.StatusInternalServerError, resp.StatusCode)
|
|
||||||
|
|
||||||
b, err := ioutil.ReadAll(resp.Body)
|
|
||||||
utils.AssertEqual(t, nil, err)
|
|
||||||
utils.AssertEqual(t, true, strings.Contains(string(b), "127.0.0.1:90000"))
|
|
||||||
}
|
|
||||||
|
|
||||||
func Test_Proxy_Forward(t *testing.T) {
|
func Test_Proxy_Forward(t *testing.T) {
|
||||||
app := fiber.New()
|
app := fiber.New()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user