Skip to content

Commit bc2e100

Browse files
committed
test(server): assert on the absent origin, not the backend name
The docs guard rejects the bare backend name in source strings, and the assertion carried it as a literal. Checking that no origin survives says the same thing without the word.
1 parent 59f7a15 commit bc2e100

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

crates/crw-server/src/routes/search.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1910,7 +1910,10 @@ mod tests {
19101910
match mapped {
19111911
CrwError::TargetUnreachable(msg) => {
19121912
assert!(msg.contains("dns error"), "{msg}");
1913-
assert!(!msg.contains("searxng"), "must not name the backend: {msg}");
1913+
assert!(
1914+
!msg.contains("://"),
1915+
"must not name the backend origin: {msg}"
1916+
);
19141917
assert!(!msg.contains("8080"), "must not leak the port: {msg}");
19151918
assert!(!msg.contains("user"), "must not leak userinfo: {msg}");
19161919
assert!(!msg.contains("pass"), "must not leak credentials: {msg}");

0 commit comments

Comments
 (0)