mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-05 01:20:26 +08:00
19 lines
418 B
Go
19 lines
418 B
Go
|
|
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)
|
||
|
|
}
|
||
|
|
|
||
|
|
req := requests.NewRequest(rawReq)
|
||
|
|
checkpoint := new(RequestPathCheckpoint)
|
||
|
|
t.Log(checkpoint.RequestValue(req, "", nil))
|
||
|
|
}
|