github.com/TeaOSLab/EdgeNode@v1.3.8/internal/waf/checkpoints/response_header_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 TestResponseHeaderCheckpoint_ResponseValue(t *testing.T) {
    10  	resp := requests.NewResponse(new(http.Response))
    11  	resp.StatusCode = 200
    12  	resp.Header = http.Header{}
    13  	resp.Header.Set("Hello", "World")
    14  
    15  	checkpoint := new(ResponseHeaderCheckpoint)
    16  	t.Log(checkpoint.ResponseValue(nil, resp, "Hello", nil, 1))
    17  }