Skip to content

Commit 84094c2

Browse files
committed
fix tests
1 parent 810cfb7 commit 84094c2

File tree

4 files changed

+22
-22
lines changed

4 files changed

+22
-22
lines changed

src/firewall/items/http_request.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ mod tests {
148148
http_request_field.get_compare_fields(&http_request),
149149
Some(FirewallCompareType::String((
150150
&"https://example.com".to_string(),
151-
Cow::Borrowed(&vec!["test.com".to_string()])
151+
&vec!["test.com".to_string()]
152152
)))
153153
);
154154
}
@@ -162,7 +162,7 @@ mod tests {
162162
http_request_field.get_compare_fields(&http_request),
163163
Some(FirewallCompareType::String((
164164
&"GET".to_string(),
165-
Cow::Borrowed(&vec!["GET".to_string(), "POST".to_string()])
165+
&vec!["GET".to_string(), "POST".to_string()]
166166
)))
167167
);
168168
}
@@ -178,7 +178,7 @@ mod tests {
178178
http_request_field.get_compare_fields(&http_request),
179179
Some(FirewallCompareType::String((
180180
&"John".to_string(),
181-
Cow::Borrowed(&vec!["Bob".to_string()])
181+
&vec!["Bob".to_string()]
182182
)))
183183
);
184184

@@ -198,7 +198,7 @@ mod tests {
198198
http_request_field.get_compare_fields(&http_request),
199199
Some(FirewallCompareType::String((
200200
&"biscuits".to_string(),
201-
Cow::Borrowed(&vec!["awesome_cookie_99".to_string()])
201+
&vec!["awesome_cookie_99".to_string()]
202202
)))
203203
);
204204
}
@@ -214,7 +214,7 @@ mod tests {
214214
http_request_field.get_compare_fields(&http_request),
215215
Some(FirewallCompareType::String((
216216
&"biscuits".to_string(),
217-
Cow::Borrowed(&vec!["Marlon".to_string()])
217+
&vec!["Marlon".to_string()]
218218
)))
219219
);
220220

@@ -226,7 +226,7 @@ mod tests {
226226
http_request_field.get_compare_fields(&http_request),
227227
Some(FirewallCompareType::String((
228228
&"example.com".to_string(),
229-
Cow::Borrowed(&vec!["sample_host".to_string()])
229+
&vec!["sample_host".to_string()]
230230
)))
231231
);
232232

@@ -246,7 +246,7 @@ mod tests {
246246
http_request_field.get_compare_fields(&http_request),
247247
Some(FirewallCompareType::String((
248248
&"Hello, World!".to_string(),
249-
Cow::Borrowed(&vec!["Hello".to_string(), "World!".to_string()])
249+
&vec!["Hello".to_string(), "World!".to_string()]
250250
)))
251251
);
252252
}
@@ -270,7 +270,7 @@ mod tests {
270270
http_request_field.get_compare_fields(&http_request),
271271
Some(FirewallCompareType::String((
272272
&"Mozilla/5.0".to_string(),
273-
Cow::Borrowed(&vec!["awesome_user_agent".to_string()])
273+
&vec!["awesome_user_agent".to_string()]
274274
)))
275275
);
276276
}

src/firewall/items/http_response.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ mod tests {
146146
http_response_field.get_compare_fields(&http_response),
147147
Some(FirewallCompareType::String((
148148
&"example.com".to_string(),
149-
Cow::Borrowed(&vec!["ciao".to_string()])
149+
&vec!["ciao".to_string()]
150150
)))
151151
);
152152

@@ -158,7 +158,7 @@ mod tests {
158158
http_response_field.get_compare_fields(&http_response),
159159
Some(FirewallCompareType::String((
160160
&"139".to_string(),
161-
Cow::Borrowed(&vec!["9999".to_string()])
161+
&vec!["9999".to_string()]
162162
)))
163163
);
164164

src/firewall/items/ip_info.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ mod tests {
121121
ip_info_field.get_compare_fields(&ip_info),
122122
Some(FirewallCompareType::String((
123123
&"IT".to_string(),
124-
Cow::Borrowed(&vec!["US".to_string()])
124+
&vec!["US".to_string()]
125125
)))
126126
);
127127
}
@@ -134,7 +134,7 @@ mod tests {
134134
ip_info_field.get_compare_fields(&ip_info),
135135
Some(FirewallCompareType::String((
136136
&"AS1234".to_string(),
137-
Cow::Borrowed(&vec!["wow".to_string()])
137+
&vec!["wow".to_string()]
138138
)))
139139
);
140140
}
@@ -147,7 +147,7 @@ mod tests {
147147
ip_info_field.get_compare_fields(&ip_info),
148148
Some(FirewallCompareType::String((
149149
&"Example".to_string(),
150-
Cow::Borrowed(&vec!["my_org_99".to_string(), "2nd org".to_string()])
150+
&vec!["my_org_99".to_string(), "2nd org".to_string()]
151151
)))
152152
);
153153
}
@@ -160,7 +160,7 @@ mod tests {
160160
ip_info_field.get_compare_fields(&ip_info),
161161
Some(FirewallCompareType::String((
162162
&"EU".to_string(),
163-
Cow::Borrowed(&vec!["NA".to_string()])
163+
&vec!["NA".to_string()]
164164
)))
165165
);
166166
}
@@ -173,7 +173,7 @@ mod tests {
173173
ip_info_field.get_compare_fields(&ip_info),
174174
Some(FirewallCompareType::String((
175175
&"Rome".to_string(),
176-
Cow::Borrowed(&vec!["New York".to_string()])
176+
&vec!["New York".to_string()]
177177
)))
178178
);
179179
}
@@ -186,7 +186,7 @@ mod tests {
186186
ip_info_field.get_compare_fields(&ip_info),
187187
Some(FirewallCompareType::String((
188188
&"Lazio".to_string(),
189-
Cow::Borrowed(&vec!["California".to_string()])
189+
&vec!["California".to_string()]
190190
)))
191191
);
192192
}
@@ -199,7 +199,7 @@ mod tests {
199199
ip_info_field.get_compare_fields(&ip_info),
200200
Some(FirewallCompareType::String((
201201
&"00100".to_string(),
202-
Cow::Borrowed(&vec!["123456".to_string()])
202+
&vec!["123456".to_string()]
203203
)))
204204
);
205205
}
@@ -212,7 +212,7 @@ mod tests {
212212
ip_info_field.get_compare_fields(&ip_info),
213213
Some(FirewallCompareType::String((
214214
&"Europe/Rome".to_string(),
215-
Cow::Borrowed(&vec!["US central".to_string()])
215+
&vec!["US central".to_string()]
216216
)))
217217
);
218218
}

src/firewall/items/smtp_request.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ mod tests {
125125
smtp_request_field.get_compare_fields(&smtp_request),
126126
Some(FirewallCompareType::String((
127127
&"Thunderbird".to_string(),
128-
Cow::Borrowed(&vec!["Marlon".to_string()])
128+
&vec!["Marlon".to_string()]
129129
)))
130130
);
131131

@@ -137,7 +137,7 @@ mod tests {
137137
smtp_request_field.get_compare_fields(&smtp_request),
138138
Some(FirewallCompareType::String((
139139
&"Best-Mail UA".to_string(),
140-
Cow::Borrowed(&vec!["sample_host".to_string()])
140+
&vec!["sample_host".to_string()]
141141
)))
142142
);
143143

@@ -157,7 +157,7 @@ mod tests {
157157
smtp_request_field.get_compare_fields(&smtp_request),
158158
Some(FirewallCompareType::String((
159159
&"Hello, Jupiter!".to_string(),
160-
Cow::Borrowed(&vec!["Hello".to_string(), "World!".to_string()])
160+
&vec!["Hello".to_string(), "World!".to_string()]
161161
)))
162162
);
163163
}
@@ -181,7 +181,7 @@ mod tests {
181181
smtp_request_field.get_compare_fields(&smtp_request),
182182
Some(FirewallCompareType::String((
183183
&"Thunderbird".to_string(),
184-
Cow::Borrowed(&vec!["awesome_user_agent".to_string()])
184+
&vec!["awesome_user_agent".to_string()]
185185
)))
186186
);
187187
}

0 commit comments

Comments
 (0)