Skip to content

Commit 37b3372

Browse files
Remove redundant test for query parameters in REST path
1 parent 497cac1 commit 37b3372

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

Diff for: internal/operators/restpath_test.go

-19
Original file line numberDiff line numberDiff line change
@@ -29,25 +29,6 @@ func TestRestPath(t *testing.T) {
2929
}
3030
}
3131

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-
5132
func TestRestPathQueryShouldNotBeGreedy(t *testing.T) {
5233
waf := corazawaf.NewWAF()
5334
tx := waf.NewTransaction()

0 commit comments

Comments
 (0)