diff --git a/linkerd/app/test/src/lib.rs b/linkerd/app/test/src/lib.rs index 1e6ec51e8..256429182 100644 --- a/linkerd/app/test/src/lib.rs +++ b/linkerd/app/test/src/lib.rs @@ -27,7 +27,6 @@ pub mod connect; pub mod http_util; pub mod profile; pub mod resolver; -pub mod service; pub mod track; pub fn resolver() -> resolver::Dst { diff --git a/linkerd/app/test/src/service.rs b/linkerd/app/test/src/service.rs deleted file mode 100644 index 584a4c0f9..000000000 --- a/linkerd/app/test/src/service.rs +++ /dev/null @@ -1,35 +0,0 @@ -use crate::{ - app_core::{proxy::http, svc}, - Error, -}; - -/// Returns a mock HTTP router that asserts that the HTTP router is never used. -pub fn no_http() -> NoHttp { - NoHttp(std::marker::PhantomData) -} - -#[derive(Clone, Copy, Debug)] -pub struct NoHttp(std::marker::PhantomData); - -impl svc::NewService for NoHttp { - type Service = Self; - fn new_service(&self, target: T) -> Self::Service { - panic!("the HTTP router should not be used in this test, but we tried to build a service for {:?}", target) - } -} - -impl svc::Service> for NoHttp { - type Response = http::Response; - type Error = Error; - type Future = futures::future::Ready>; - fn poll_ready( - &mut self, - _: &mut std::task::Context<'_>, - ) -> std::task::Poll> { - panic!("http services should not be used in this test!") - } - - fn call(&mut self, _: http::Request) -> Self::Future { - panic!("http services should not be used in this test!") - } -}