Skip to content

Commit

Permalink
test: cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Alexis Asseman <[email protected]>
  • Loading branch information
aasseman committed Feb 2, 2024
1 parent 68f3369 commit 06810ec
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions tap-agent/src/tap/sender_account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,21 +405,6 @@ impl Drop for SenderAccount {
}
}

#[cfg(test)]
impl SenderAccount {
pub async fn _tests_get_allocations_active(
&self,
) -> MutexGuard<'_, HashMap<Address, Arc<SenderAllocation>>> {
self.inner.allocations_active.lock().await
}

pub async fn _tests_get_allocations_ineligible(
&self,
) -> MutexGuard<'_, HashMap<Address, Arc<SenderAllocation>>> {
self.inner.allocations_ineligible.lock().await
}
}

#[cfg(test)]
mod tests {

Expand All @@ -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<Address, Arc<SenderAllocation>>> {
self.inner.allocations_active.lock().await
}

pub async fn _tests_get_allocations_ineligible(
&self,
) -> MutexGuard<'_, HashMap<Address, Arc<SenderAllocation>>> {
self.inner.allocations_ineligible.lock().await
}
}

async fn create_sender_with_allocations(
pgpool: PgPool,
sender_aggregator_endpoint: String,
Expand Down

0 comments on commit 06810ec

Please sign in to comment.