summaryrefslogtreecommitdiff
path: root/test_util/src
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-11-23 12:54:27 -0500
committerGitHub <noreply@github.com>2023-11-23 17:54:27 +0000
commitd8961a9dfe7f07b90e69efd29bfb86adf765dace (patch)
tree702ea8ff0bd55dab0f7fb483868ccd003bec7de6 /test_util/src
parent68a0877f8dc4a821b3688105b24953ddfaa9e189 (diff)
chore: fix upgrade_prompt test on main (#21314)
Issue was main does canary builds, which broke this test because it didn't handle searching for a canary release. Tested by building as canary locally.
Diffstat (limited to 'test_util/src')
-rw-r--r--test_util/src/lib.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/test_util/src/lib.rs b/test_util/src/lib.rs
index c38f2bb0f..0f402fb52 100644
--- a/test_util/src/lib.rs
+++ b/test_util/src/lib.rs
@@ -1282,6 +1282,15 @@ async fn main_server(
.unwrap(),
);
}
+ (&hyper::Method::GET, "/upgrade/sleep/canary-latest.txt") => {
+ tokio::time::sleep(Duration::from_secs(45)).await;
+ return Ok(
+ Response::builder()
+ .status(StatusCode::OK)
+ .body(Body::from("bda3850f84f24b71e02512c1ba2d6bf2e3daa2fd"))
+ .unwrap(),
+ );
+ }
(&hyper::Method::GET, "/release-latest.txt") => {
return Ok(
Response::builder()
@@ -1291,6 +1300,14 @@ async fn main_server(
.unwrap(),
);
}
+ (&hyper::Method::GET, "/canary-latest.txt") => {
+ return Ok(
+ Response::builder()
+ .status(StatusCode::OK)
+ .body(Body::from("bda3850f84f24b71e02512c1ba2d6bf2e3daa2fd"))
+ .unwrap(),
+ );
+ }
_ => {
let mut file_path = testdata_path().to_path_buf();
file_path.push(&req.uri().path()[1..].replace("%2f", "/"));