Files
EdgeNode/internal/waf/checkpoints/request_path_test.go

19 lines
422 B
Go
Raw Normal View History

2020-10-08 15:06:42 +08:00
package checkpoints
import (
"github.com/TeaOSLab/EdgeNode/internal/waf/requests"
"net/http"
"testing"
)
func TestRequestPathCheckpoint_RequestValue(t *testing.T) {
rawReq, err := http.NewRequest(http.MethodGet, "http://teaos.cn/index?name=lu", nil)
if err != nil {
t.Fatal(err)
}
2021-07-18 15:51:49 +08:00
req := requests.NewTestRequest(rawReq)
2020-10-08 15:06:42 +08:00
checkpoint := new(RequestPathCheckpoint)
t.Log(checkpoint.RequestValue(req, "", nil))
}