We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 497cac1 commit 37b3372Copy full SHA for 37b3372
internal/operators/restpath_test.go
@@ -29,25 +29,6 @@ func TestRestPath(t *testing.T) {
29
}
30
31
32
-func TestRestPathQueryShouldNotBeIncluded(t *testing.T) {
33
- waf := corazawaf.NewWAF()
34
- tx := waf.NewTransaction()
35
- exp := "/some-random/url/{id}"
36
- path := "/some-random/url/123?name=foo"
37
- rp, err := newRESTPath(plugintypes.OperatorOptions{
38
- Arguments: exp,
39
- })
40
- if err != nil {
41
- t.Error(err)
42
- }
43
- if !rp.Evaluate(tx, path) {
44
- t.Errorf("Expected %s to match %s", exp, path)
45
46
- if tx.Variables().ArgsPath().Get("id")[0] != "123" {
47
- t.Errorf("Expected id value of 123, got %s", tx.Variables().ArgsPath().Get("id"))
48
49
-}
50
-
51
func TestRestPathQueryShouldNotBeGreedy(t *testing.T) {
52
waf := corazawaf.NewWAF()
53
tx := waf.NewTransaction()
0 commit comments