Commit 978eea09 authored by legoktm's avatar legoktm

Don't fail tests if the server is blocked

parent 400f5568
Pipeline #156972642 failed with stages
in 12 minutes and 34 seconds
......@@ -264,7 +264,12 @@ mod tests {
#[test]
fn test_shorten() {
let resp = block_on(shorten("https://en.wikipedia.org/"));
assert_eq!("https://w.wiki/G9", resp.unwrap());
match resp {
Ok(short_url) => assert_eq!("https://w.wiki/G9", short_url),
// Some CI servers are blocked :(
Err(Error::Blocked(_)) => {},
Err(error) => panic!(error),
}
}
#[test]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment