Actually run the routing tests 🤦

This commit is contained in:
David Pedersen 2021-11-04 12:48:37 +01:00
parent a47d7eca40
commit 0be0ea6763
3 changed files with 3 additions and 8 deletions

View file

@ -37,7 +37,7 @@ mod not_found;
mod route;
mod strip_prefix;
#[cfg(tests)]
#[cfg(test)]
mod tests;
pub use self::{

View file

@ -1,5 +1,4 @@
use crate::error_handling::HandleErrorLayer;
use crate::extract::{Extension, MatchedPath};
use crate::test_helpers::*;
use crate::BoxError;
use crate::{
@ -10,17 +9,13 @@ use crate::{
Json, Router,
};
use bytes::Bytes;
use http::{
header::{HeaderMap, AUTHORIZATION},
Method, Request, Response, StatusCode, Uri,
};
use http::{header::HeaderMap, Method, Request, Response, StatusCode, Uri};
use hyper::Body;
use serde::Deserialize;
use serde_json::{json, Value};
use std::future::Ready;
use std::sync::atomic::{AtomicUsize, Ordering};
use std::{
collections::HashMap,
convert::Infallible,
future::ready,
task::{Context, Poll},

View file

@ -10,7 +10,7 @@
//! $ curl -v -x "127.0.0.1:3000" https://tokio.rs
//! ```
//!
//! Example is based on https://github.com/hyperium/hyper/blob/master/examples/http_proxy.rs
//! Example is based on <https://github.com/hyperium/hyper/blob/master/examples/http_proxy.rs>
use axum::{
body::{box_body, Body},