aboutsummaryrefslogtreecommitdiffstats
path: root/tests/mock.rs
diff options
context:
space:
mode:
authorsalmonik <salmon@2137697.xyz>2026-11-23 20:36:22 +0100
committersalmonik <salmon@2137697.xyz>2026-11-23 20:36:22 +0100
commite803aa488c3a95193d3e3ae358b640c299f8f121 (patch)
tree0af80401445159ca40a8ab3d7bbf39094ab5db77 /tests/mock.rs
parent0.12.1: accept `command` as an alias for `cmd` in bash (diff)
downloadagent686-e803aa488c3a95193d3e3ae358b640c299f8f121.tar.gz
agent686-e803aa488c3a95193d3e3ae358b640c299f8f121.zip
License
Diffstat (limited to '')
-rw-r--r--tests/mock.rs12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/mock.rs b/tests/mock.rs
index 3b2abdd..10f3b76 100644
--- a/tests/mock.rs
+++ b/tests/mock.rs
@@ -1,3 +1,10 @@
1/*
2 * This file is part of agent686
3 * Copyright (C) 2026 Salmonik <salmon@2137697.xyz>
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 * https://git.2137697.xyz/agent686
6 */
7
1use std::io::{BufRead, BufReader, Read, Write}; 8use std::io::{BufRead, BufReader, Read, Write};
2use std::net::TcpListener; 9use std::net::TcpListener;
3use std::sync::atomic::AtomicBool; 10use std::sync::atomic::AtomicBool;
@@ -272,7 +279,10 @@ fn retries_a_rate_limit_and_keeps_the_same_session_header() {
272 let first = rx.recv().expect("first request").to_ascii_lowercase(); 279 let first = rx.recv().expect("first request").to_ascii_lowercase();
273 let second = rx.recv().expect("second request").to_ascii_lowercase(); 280 let second = rx.recv().expect("second request").to_ascii_lowercase();
274 assert!(first.contains("x-opencode-session: testsession"), "{first}"); 281 assert!(first.contains("x-opencode-session: testsession"), "{first}");
275 assert!(second.contains("x-opencode-session: testsession"), "{second}"); 282 assert!(
283 second.contains("x-opencode-session: testsession"),
284 "{second}"
285 );
276} 286}
277 287
278#[test] 288#[test]