Skip to content

Commit 1c56f65

Browse files
committed
chore: apply review suggestions
1 parent 3dfcc7d commit 1c56f65

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

test/data_test.go

+9-7
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"testing"
88

99
schema "github.com/coreruleset/ftw-tests-schema/v2/types"
10+
"github.com/coreruleset/go-ftw/ftwhttp/header_values"
1011
"github.com/rs/zerolog"
1112
"github.com/stretchr/testify/suite"
1213
"gopkg.in/yaml.v3"
@@ -34,12 +35,13 @@ port: 80
3435
headers:
3536
User-Agent: "ModSecurity CRS 3 Tests"
3637
Host: "localhost"
37-
Content-Type: header_values.ApplicationXWwwFormUrlencoded
38+
Content-Type: ` + header_values.ApplicationXWwwFormUrlencoded + `
3839
data: "hi=test"
3940
protocol: "http"
4041
autocomplete_headers: true
4142
uri: "/"
4243
`
44+
4345
input := &schema.Input{}
4446
err := yaml.Unmarshal([]byte(yamlString), &input)
4547
s.Require().NoError(err)
@@ -54,7 +56,7 @@ port: 80
5456
headers:
5557
User-Agent: "ModSecurity CRS 3 Tests"
5658
Host: "localhost"
57-
Content-Type: header_values.ApplicationXWwwFormUrlencoded
59+
Content-Type: ` + header_values.ApplicationXWwwFormUrlencoded + `
5860
data: "hi=test"
5961
version: ""
6062
protocol: "http"
@@ -76,7 +78,7 @@ port: 80
7678
headers:
7779
User-Agent: "ModSecurity CRS 3 Tests"
7880
Host: "localhost"
79-
Content-Type: header_values.ApplicationXWwwFormUrlencoded
81+
Content-Type: ` + header_values.ApplicationXWwwFormUrlencoded + `
8082
data: 'foo=%3d{{ "+" | repeat 34 }}'
8183
version: ""
8284
protocol: "http"
@@ -103,7 +105,7 @@ port: 80
103105
headers:
104106
User-Agent: "ModSecurity CRS 3 Tests"
105107
Host: "localhost"
106-
Content-Type: header_values.ApplicationXWwwFormUrlencoded
108+
Content-Type: ` + header_values.ApplicationXWwwFormUrlencoded + `
107109
data: 'foo=%3d{{ "+" | repeat 34 }}'
108110
version: ""
109111
protocol: "http"
@@ -130,7 +132,7 @@ port: 80
130132
headers:
131133
User-Agent: "ModSecurity CRS 3 Tests"
132134
Host: "localhost"
133-
Content-Type: header_values.ApplicationXWwwFormUrlencoded
135+
Content-Type: ` + header_values.ApplicationXWwwFormUrlencoded + `
134136
data: 'foo=%3d{{ "+" | repeat 34 }'
135137
version: ""
136138
protocol: "http"
@@ -155,7 +157,7 @@ port: 80
155157
headers:
156158
User-Agent: "ModSecurity CRS 3 Tests"
157159
Host: "localhost"
158-
Content-Type: header_values.ApplicationXWwwFormUrlencoded
160+
Content-Type: ` + header_values.ApplicationXWwwFormUrlencoded + `
159161
encoded_data: VGhpcyBpcyBTcHJpbmdmaWVsZA==
160162
version: ""
161163
protocol: "http"
@@ -179,7 +181,7 @@ port: 80
179181
headers:
180182
User-Agent: "ModSecurity CRS 3 Tests"
181183
Host: "localhost"
182-
Content-Type: header_values.ApplicationXWwwFormUrlencoded
184+
Content-Type: ` + header_values.ApplicationXWwwFormUrlencoded + `
183185
encoded_data: VGhpcyBpcyBTcHJpbmdmaWVsZA===
184186
version: ""
185187
protocol: "http"

0 commit comments

Comments
 (0)