github.com/TeaOSLab/EdgeNode@v1.3.8/internal/waf/checkpoints/request_path_test.go (about) 1 package checkpoints 2 3 import ( 4 "github.com/TeaOSLab/EdgeNode/internal/waf/requests" 5 "net/http" 6 "testing" 7 ) 8 9 func TestRequestPathCheckpoint_RequestValue(t *testing.T) { 10 rawReq, err := http.NewRequest(http.MethodGet, "http://teaos.cn/index?name=lu", nil) 11 if err != nil { 12 t.Fatal(err) 13 } 14 15 req := requests.NewTestRequest(rawReq) 16 checkpoint := new(RequestPathCheckpoint) 17 t.Log(checkpoint.RequestValue(req, "", nil, 1)) 18 }