feat: add http to http method test case (#4820)

This commit is contained in:
Qiu shao
2025-05-02 14:59:36 +08:00
committed by GitHub
parent 6b8053410a
commit 7ef13116a0

View File

@@ -201,6 +201,13 @@ func TestHttpToHttp(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, http.StatusNotFound, resp.StatusCode)
})
t.Run("method not allowed", func(t *testing.T) {
resp, err := httpc.Do(context.Background(), http.MethodPost,
"http://localhost:18882/api/ping", nil)
assert.NoError(t, err)
assert.Equal(t, http.StatusMethodNotAllowed, resp.StatusCode)
})
}
func TestHttpToHttpBadUpstream(t *testing.T) {