Skip to content

Commit 8325a6b

Browse files
committed
Rust: Introduce more functions in Axum test
1 parent 0f40b3c commit 8325a6b

File tree

3 files changed

+61
-62
lines changed

3 files changed

+61
-62
lines changed

rust/ql/test/library-tests/dataflow/sources/web_frameworks/InlineFlow.expected

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,14 @@ edges
7878
| test.rs:131:17:131:33 | path.into_inner() [tuple.2] | test.rs:131:13:131:13 | a [tuple.2] | provenance | |
7979
| test.rs:139:41:139:42 | to | test.rs:98:9:98:31 | ...: ...::Path::<...> | provenance | Src:MaD:5 |
8080
| test.rs:140:45:140:46 | to | test.rs:109:9:109:41 | ...: ...::Path::<...> | provenance | Src:MaD:5 |
81-
| test.rs:242:33:242:35 | map | test.rs:242:38:242:46 | ...: String | provenance | Src:MaD:2 |
82-
| test.rs:242:38:242:46 | ...: String | test.rs:244:18:244:18 | a | provenance | |
83-
| test.rs:250:46:250:49 | then | test.rs:251:25:251:33 | ...: String | provenance | Src:MaD:3 |
84-
| test.rs:251:25:251:33 | ...: String | test.rs:252:22:252:22 | a | provenance | |
85-
| test.rs:259:50:259:57 | and_then | test.rs:260:26:260:32 | ...: u64 | provenance | Src:MaD:1 |
86-
| test.rs:260:26:260:32 | ...: u64 | test.rs:263:22:263:23 | id | provenance | |
87-
| test.rs:272:75:272:77 | map | test.rs:273:15:273:23 | ...: String | provenance | Src:MaD:2 |
88-
| test.rs:273:15:273:23 | ...: String | test.rs:275:22:275:22 | a | provenance | |
81+
| test.rs:241:33:241:35 | map | test.rs:241:38:241:46 | ...: String | provenance | Src:MaD:2 |
82+
| test.rs:241:38:241:46 | ...: String | test.rs:243:18:243:18 | a | provenance | |
83+
| test.rs:249:46:249:49 | then | test.rs:250:25:250:33 | ...: String | provenance | Src:MaD:3 |
84+
| test.rs:250:25:250:33 | ...: String | test.rs:251:22:251:22 | a | provenance | |
85+
| test.rs:258:50:258:57 | and_then | test.rs:259:26:259:32 | ...: u64 | provenance | Src:MaD:1 |
86+
| test.rs:259:26:259:32 | ...: u64 | test.rs:262:22:262:23 | id | provenance | |
87+
| test.rs:271:75:271:77 | map | test.rs:272:15:272:23 | ...: String | provenance | Src:MaD:2 |
88+
| test.rs:272:15:272:23 | ...: String | test.rs:274:22:274:22 | a | provenance | |
8989
nodes
9090
| test.rs:11:31:11:31 | a | semmle.label | a |
9191
| test.rs:13:14:13:14 | a | semmle.label | a |
@@ -137,18 +137,18 @@ nodes
137137
| test.rs:132:14:132:14 | a | semmle.label | a |
138138
| test.rs:139:41:139:42 | to | semmle.label | to |
139139
| test.rs:140:45:140:46 | to | semmle.label | to |
140-
| test.rs:242:33:242:35 | map | semmle.label | map |
141-
| test.rs:242:38:242:46 | ...: String | semmle.label | ...: String |
142-
| test.rs:244:18:244:18 | a | semmle.label | a |
143-
| test.rs:250:46:250:49 | then | semmle.label | then |
144-
| test.rs:251:25:251:33 | ...: String | semmle.label | ...: String |
145-
| test.rs:252:22:252:22 | a | semmle.label | a |
146-
| test.rs:259:50:259:57 | and_then | semmle.label | and_then |
147-
| test.rs:260:26:260:32 | ...: u64 | semmle.label | ...: u64 |
148-
| test.rs:263:22:263:23 | id | semmle.label | id |
149-
| test.rs:272:75:272:77 | map | semmle.label | map |
150-
| test.rs:273:15:273:23 | ...: String | semmle.label | ...: String |
151-
| test.rs:275:22:275:22 | a | semmle.label | a |
140+
| test.rs:241:33:241:35 | map | semmle.label | map |
141+
| test.rs:241:38:241:46 | ...: String | semmle.label | ...: String |
142+
| test.rs:243:18:243:18 | a | semmle.label | a |
143+
| test.rs:249:46:249:49 | then | semmle.label | then |
144+
| test.rs:250:25:250:33 | ...: String | semmle.label | ...: String |
145+
| test.rs:251:22:251:22 | a | semmle.label | a |
146+
| test.rs:258:50:258:57 | and_then | semmle.label | and_then |
147+
| test.rs:259:26:259:32 | ...: u64 | semmle.label | ...: u64 |
148+
| test.rs:262:22:262:23 | id | semmle.label | id |
149+
| test.rs:271:75:271:77 | map | semmle.label | map |
150+
| test.rs:272:15:272:23 | ...: String | semmle.label | ...: String |
151+
| test.rs:274:22:274:22 | a | semmle.label | a |
152152
subpaths
153153
testFailures
154154
#select
@@ -162,7 +162,7 @@ testFailures
162162
| test.rs:113:14:113:14 | a | test.rs:140:45:140:46 | to | test.rs:113:14:113:14 | a | $@ | test.rs:140:45:140:46 | to | to |
163163
| test.rs:114:14:114:14 | b | test.rs:140:45:140:46 | to | test.rs:114:14:114:14 | b | $@ | test.rs:140:45:140:46 | to | to |
164164
| test.rs:132:14:132:14 | a | test.rs:127:5:127:20 | to | test.rs:132:14:132:14 | a | $@ | test.rs:127:5:127:20 | to | to |
165-
| test.rs:244:18:244:18 | a | test.rs:242:33:242:35 | map | test.rs:244:18:244:18 | a | $@ | test.rs:242:33:242:35 | map | map |
166-
| test.rs:252:22:252:22 | a | test.rs:250:46:250:49 | then | test.rs:252:22:252:22 | a | $@ | test.rs:250:46:250:49 | then | then |
167-
| test.rs:263:22:263:23 | id | test.rs:259:50:259:57 | and_then | test.rs:263:22:263:23 | id | $@ | test.rs:259:50:259:57 | and_then | and_then |
168-
| test.rs:275:22:275:22 | a | test.rs:272:75:272:77 | map | test.rs:275:22:275:22 | a | $@ | test.rs:272:75:272:77 | map | map |
165+
| test.rs:243:18:243:18 | a | test.rs:241:33:241:35 | map | test.rs:243:18:243:18 | a | $@ | test.rs:241:33:241:35 | map | map |
166+
| test.rs:251:22:251:22 | a | test.rs:249:46:249:49 | then | test.rs:251:22:251:22 | a | $@ | test.rs:249:46:249:49 | then | then |
167+
| test.rs:262:22:262:23 | id | test.rs:258:50:258:57 | and_then | test.rs:262:22:262:23 | id | $@ | test.rs:258:50:258:57 | and_then | and_then |
168+
| test.rs:274:22:274:22 | a | test.rs:271:75:271:77 | map | test.rs:274:22:274:22 | a | $@ | test.rs:271:75:271:77 | map | map |

rust/ql/test/library-tests/dataflow/sources/web_frameworks/TaintSources.expected

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -35,35 +35,35 @@
3535
| test.rs:141:41:141:42 | to | Flow source 'RemoteSource' of type remote (DEFAULT). |
3636
| test.rs:141:41:141:42 | to | Flow source 'RemoteSource' of type remote (DEFAULT). |
3737
| test.rs:141:41:141:42 | to | Flow source 'RemoteSource' of type remote (DEFAULT). |
38-
| test.rs:242:33:242:35 | map | Flow source 'RemoteSource' of type remote (DEFAULT). |
39-
| test.rs:242:33:242:35 | map | Flow source 'RemoteSource' of type remote (DEFAULT). |
40-
| test.rs:242:33:242:35 | map | Flow source 'RemoteSource' of type remote (DEFAULT). |
41-
| test.rs:242:33:242:35 | map | Flow source 'RemoteSource' of type remote (DEFAULT). |
42-
| test.rs:242:33:242:35 | map | Flow source 'RemoteSource' of type remote (DEFAULT). |
43-
| test.rs:242:33:242:35 | map | Flow source 'RemoteSource' of type remote (DEFAULT). |
44-
| test.rs:242:33:242:35 | map | Flow source 'RemoteSource' of type remote (DEFAULT). |
45-
| test.rs:242:33:242:35 | map | Flow source 'RemoteSource' of type remote (DEFAULT). |
46-
| test.rs:250:46:250:49 | then | Flow source 'RemoteSource' of type remote (DEFAULT). |
47-
| test.rs:250:46:250:49 | then | Flow source 'RemoteSource' of type remote (DEFAULT). |
48-
| test.rs:250:46:250:49 | then | Flow source 'RemoteSource' of type remote (DEFAULT). |
49-
| test.rs:250:46:250:49 | then | Flow source 'RemoteSource' of type remote (DEFAULT). |
50-
| test.rs:250:46:250:49 | then | Flow source 'RemoteSource' of type remote (DEFAULT). |
51-
| test.rs:250:46:250:49 | then | Flow source 'RemoteSource' of type remote (DEFAULT). |
52-
| test.rs:250:46:250:49 | then | Flow source 'RemoteSource' of type remote (DEFAULT). |
53-
| test.rs:250:46:250:49 | then | Flow source 'RemoteSource' of type remote (DEFAULT). |
54-
| test.rs:259:50:259:57 | and_then | Flow source 'RemoteSource' of type remote (DEFAULT). |
55-
| test.rs:259:50:259:57 | and_then | Flow source 'RemoteSource' of type remote (DEFAULT). |
56-
| test.rs:259:50:259:57 | and_then | Flow source 'RemoteSource' of type remote (DEFAULT). |
57-
| test.rs:259:50:259:57 | and_then | Flow source 'RemoteSource' of type remote (DEFAULT). |
58-
| test.rs:259:50:259:57 | and_then | Flow source 'RemoteSource' of type remote (DEFAULT). |
59-
| test.rs:259:50:259:57 | and_then | Flow source 'RemoteSource' of type remote (DEFAULT). |
60-
| test.rs:259:50:259:57 | and_then | Flow source 'RemoteSource' of type remote (DEFAULT). |
61-
| test.rs:259:50:259:57 | and_then | Flow source 'RemoteSource' of type remote (DEFAULT). |
62-
| test.rs:272:75:272:77 | map | Flow source 'RemoteSource' of type remote (DEFAULT). |
63-
| test.rs:272:75:272:77 | map | Flow source 'RemoteSource' of type remote (DEFAULT). |
64-
| test.rs:272:75:272:77 | map | Flow source 'RemoteSource' of type remote (DEFAULT). |
65-
| test.rs:272:75:272:77 | map | Flow source 'RemoteSource' of type remote (DEFAULT). |
66-
| test.rs:272:75:272:77 | map | Flow source 'RemoteSource' of type remote (DEFAULT). |
67-
| test.rs:272:75:272:77 | map | Flow source 'RemoteSource' of type remote (DEFAULT). |
68-
| test.rs:272:75:272:77 | map | Flow source 'RemoteSource' of type remote (DEFAULT). |
69-
| test.rs:272:75:272:77 | map | Flow source 'RemoteSource' of type remote (DEFAULT). |
38+
| test.rs:241:33:241:35 | map | Flow source 'RemoteSource' of type remote (DEFAULT). |
39+
| test.rs:241:33:241:35 | map | Flow source 'RemoteSource' of type remote (DEFAULT). |
40+
| test.rs:241:33:241:35 | map | Flow source 'RemoteSource' of type remote (DEFAULT). |
41+
| test.rs:241:33:241:35 | map | Flow source 'RemoteSource' of type remote (DEFAULT). |
42+
| test.rs:241:33:241:35 | map | Flow source 'RemoteSource' of type remote (DEFAULT). |
43+
| test.rs:241:33:241:35 | map | Flow source 'RemoteSource' of type remote (DEFAULT). |
44+
| test.rs:241:33:241:35 | map | Flow source 'RemoteSource' of type remote (DEFAULT). |
45+
| test.rs:241:33:241:35 | map | Flow source 'RemoteSource' of type remote (DEFAULT). |
46+
| test.rs:249:46:249:49 | then | Flow source 'RemoteSource' of type remote (DEFAULT). |
47+
| test.rs:249:46:249:49 | then | Flow source 'RemoteSource' of type remote (DEFAULT). |
48+
| test.rs:249:46:249:49 | then | Flow source 'RemoteSource' of type remote (DEFAULT). |
49+
| test.rs:249:46:249:49 | then | Flow source 'RemoteSource' of type remote (DEFAULT). |
50+
| test.rs:249:46:249:49 | then | Flow source 'RemoteSource' of type remote (DEFAULT). |
51+
| test.rs:249:46:249:49 | then | Flow source 'RemoteSource' of type remote (DEFAULT). |
52+
| test.rs:249:46:249:49 | then | Flow source 'RemoteSource' of type remote (DEFAULT). |
53+
| test.rs:249:46:249:49 | then | Flow source 'RemoteSource' of type remote (DEFAULT). |
54+
| test.rs:258:50:258:57 | and_then | Flow source 'RemoteSource' of type remote (DEFAULT). |
55+
| test.rs:258:50:258:57 | and_then | Flow source 'RemoteSource' of type remote (DEFAULT). |
56+
| test.rs:258:50:258:57 | and_then | Flow source 'RemoteSource' of type remote (DEFAULT). |
57+
| test.rs:258:50:258:57 | and_then | Flow source 'RemoteSource' of type remote (DEFAULT). |
58+
| test.rs:258:50:258:57 | and_then | Flow source 'RemoteSource' of type remote (DEFAULT). |
59+
| test.rs:258:50:258:57 | and_then | Flow source 'RemoteSource' of type remote (DEFAULT). |
60+
| test.rs:258:50:258:57 | and_then | Flow source 'RemoteSource' of type remote (DEFAULT). |
61+
| test.rs:258:50:258:57 | and_then | Flow source 'RemoteSource' of type remote (DEFAULT). |
62+
| test.rs:271:75:271:77 | map | Flow source 'RemoteSource' of type remote (DEFAULT). |
63+
| test.rs:271:75:271:77 | map | Flow source 'RemoteSource' of type remote (DEFAULT). |
64+
| test.rs:271:75:271:77 | map | Flow source 'RemoteSource' of type remote (DEFAULT). |
65+
| test.rs:271:75:271:77 | map | Flow source 'RemoteSource' of type remote (DEFAULT). |
66+
| test.rs:271:75:271:77 | map | Flow source 'RemoteSource' of type remote (DEFAULT). |
67+
| test.rs:271:75:271:77 | map | Flow source 'RemoteSource' of type remote (DEFAULT). |
68+
| test.rs:271:75:271:77 | map | Flow source 'RemoteSource' of type remote (DEFAULT). |
69+
| test.rs:271:75:271:77 | map | Flow source 'RemoteSource' of type remote (DEFAULT). |

rust/ql/test/library-tests/dataflow/sources/web_frameworks/test.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ mod actix_test {
148148
mod axum_test {
149149
use super::sink;
150150
use axum::extract::{Json, Path, Query, Request};
151-
use axum::routing::get;
151+
use axum::routing::{MethodFilter, get, post, put};
152152
use axum::Router;
153153
use std::collections::HashMap;
154154

@@ -220,11 +220,10 @@ mod axum_test {
220220
async fn test_axum() {
221221
let app = Router::<()>::new()
222222
.route("/1/{a}", get(my_axum_handler_1))
223-
.route("/2/{a}/{b}", get(my_axum_handler_2))
224-
.route("/3/:a", get(my_axum_handler_3))
225-
.route("/4/:a", get(my_axum_handler_4))
226-
.route("/5/:a", get(my_axum_handler_5))
227-
.route("/67/:a", get(my_axum_handler_6).get(my_axum_handler_7));
223+
.route("/2/{a}/{b}", post(my_axum_handler_2))
224+
.route("/3/:a", put(my_axum_handler_3))
225+
.route("/4/:a", get(my_axum_handler_4).on(MethodFilter::DELETE, my_axum_handler_5))
226+
.route("/5/:a", get(my_axum_handler_6).get(my_axum_handler_7));
228227

229228
// ...
230229
}

0 commit comments

Comments
 (0)