chore(app/test): remove unused `service` submodule (#3928)

`linkerd_app_test::service` contains facilities that are unused.

this commit removes this submodule from the `linkerd-app-test` library.

Signed-off-by: katelyn martin <kate@buoyant.io>
This commit is contained in:
katelyn martin 2025-05-23 12:25:00 -04:00 committed by GitHub
parent 21fd4ec51b
commit c00ce3241b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 0 additions and 36 deletions

View File

@ -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<E>() -> resolver::Dst<E> {

View File

@ -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<T>() -> NoHttp<T> {
NoHttp(std::marker::PhantomData)
}
#[derive(Clone, Copy, Debug)]
pub struct NoHttp<T>(std::marker::PhantomData<fn(T)>);
impl<T: std::fmt::Debug> svc::NewService<T> for NoHttp<T> {
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<T> svc::Service<http::Request<http::BoxBody>> for NoHttp<T> {
type Response = http::Response<http::BoxBody>;
type Error = Error;
type Future = futures::future::Ready<Result<Self::Response, Self::Error>>;
fn poll_ready(
&mut self,
_: &mut std::task::Context<'_>,
) -> std::task::Poll<Result<(), Self::Error>> {
panic!("http services should not be used in this test!")
}
fn call(&mut self, _: http::Request<http::BoxBody>) -> Self::Future {
panic!("http services should not be used in this test!")
}
}