Make tests use a shared index

This commit is contained in:
Mubelotix 2025-07-03 11:24:09 +02:00
parent 65ba7b47af
commit 0b89ef1fd7
No known key found for this signature in database
GPG key ID: 0406DF6C3A69B942
2 changed files with 128 additions and 137 deletions

View file

@ -35,7 +35,7 @@ pub struct Server<State = Owned> {
pub static TEST_TEMP_DIR: Lazy<TempDir> = Lazy::new(|| TempDir::new().unwrap());
impl Server<Owned> {
fn into_shared(self) -> Server<Shared> {
pub fn into_shared(self) -> Server<Shared> {
Server { service: self.service, _dir: self._dir, _marker: PhantomData }
}
@ -327,7 +327,7 @@ impl<State> Server<State> {
self.service.get(url).await
}
pub(super) fn _index(&self, uid: impl AsRef<str>) -> Index<'_> {
pub fn _index(&self, uid: impl AsRef<str>) -> Index<'_> {
Index {
uid: uid.as_ref().to_string(),
service: &self.service,