From 06810ecacb4e55abf76a67c1c188e99bc16350bb Mon Sep 17 00:00:00 2001 From: Alexis Asseman Date: Thu, 1 Feb 2024 17:16:22 -0800 Subject: [PATCH] test: cleanup Signed-off-by: Alexis Asseman --- tap-agent/src/tap/sender_account.rs | 30 ++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/tap-agent/src/tap/sender_account.rs b/tap-agent/src/tap/sender_account.rs index 2f701b17..5d35c278 100644 --- a/tap-agent/src/tap/sender_account.rs +++ b/tap-agent/src/tap/sender_account.rs @@ -405,21 +405,6 @@ impl Drop for SenderAccount { } } -#[cfg(test)] -impl SenderAccount { - pub async fn _tests_get_allocations_active( - &self, - ) -> MutexGuard<'_, HashMap>> { - self.inner.allocations_active.lock().await - } - - pub async fn _tests_get_allocations_ineligible( - &self, - ) -> MutexGuard<'_, HashMap>> { - self.inner.allocations_ineligible.lock().await - } -} - #[cfg(test)] mod tests { @@ -441,6 +426,21 @@ mod tests { const DUMMY_URL: &str = "http://localhost:1234"; + // To help with testing from other modules. + impl SenderAccount { + pub async fn _tests_get_allocations_active( + &self, + ) -> MutexGuard<'_, HashMap>> { + self.inner.allocations_active.lock().await + } + + pub async fn _tests_get_allocations_ineligible( + &self, + ) -> MutexGuard<'_, HashMap>> { + self.inner.allocations_ineligible.lock().await + } + } + async fn create_sender_with_allocations( pgpool: PgPool, sender_aggregator_endpoint: String,