github.com/TeaOSLab/EdgeNode@v1.3.8/internal/waf/checkpoints/request_scheme_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 TestRequestSchemeCheckpoint_RequestValue(t *testing.T) {
    10  	rawReq, err := http.NewRequest(http.MethodGet, "https://teaos.cn/?name=lu", nil)
    11  	if err != nil {
    12  		t.Fatal(err)
    13  	}
    14  
    15  	req := requests.NewTestRequest(rawReq)
    16  	checkpoint := new(RequestSchemeCheckpoint)
    17  	t.Log(checkpoint.RequestValue(req, "", nil, 1))
    18  }