Skip to content

Commit 73887d8

Browse files
Polish route dispatch tests
1 parent 055ce1f commit 73887d8

1 file changed

Lines changed: 3 additions & 14 deletions

File tree

crates/trusted-server-adapter-fastly/src/route_tests.rs

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -173,21 +173,10 @@ fn create_test_settings_with(consent_store: Option<&str>, origin_url: &str) -> S
173173
settings
174174
}
175175

176-
fn build_route_stack(
177-
settings: &Settings,
178-
) -> (
179-
trusted_server_core::auction::AuctionOrchestrator,
180-
IntegrationRegistry,
181-
) {
176+
fn route_with_settings(settings: &Settings, req: Request) -> Option<Response> {
182177
let orchestrator = build_orchestrator(settings).expect("should build auction orchestrator");
183178
let integration_registry =
184179
IntegrationRegistry::new(settings).expect("should create integration registry");
185-
186-
(orchestrator, integration_registry)
187-
}
188-
189-
fn route_with_settings(settings: &Settings, req: Request) -> Option<Response> {
190-
let (orchestrator, integration_registry) = build_route_stack(settings);
191180
let runtime_services = test_runtime_services(&req);
192181

193182
futures::executor::block_on(route_request(
@@ -241,9 +230,9 @@ fn static_tsjs_route_serves_unified_bundle() {
241230
}
242231

243232
#[test]
244-
fn static_tsjs_route_returns_not_found_for_unknown_bundle() {
233+
fn static_tsjs_route_returns_not_found_for_unknown_tsjs_bundle() {
245234
let settings = create_test_settings();
246-
let req = Request::get("https://test.com/static/tsjs=unknown.js");
235+
let req = Request::get("https://test.com/static/tsjs=tsjs-doesnotexist.min.js");
247236

248237
let resp = route_with_settings(&settings, req).expect("should route static tsjs request");
249238

0 commit comments

Comments
 (0)