Skip to content

Remove integration tests from torrent-repository package #1520

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

josecelano
Copy link
Member

@josecelano josecelano commented May 16, 2025

All features are now covered by unit tests.

I have also removed unused trait implementations for the Swarm type. If we need them in the future, we should extract a private type to use derived implementations:

From:

#[derive(Clone)]
pub struct Swarm {
    info_hash: InfoHash,
    peers: BTreeMap<SocketAddr, Arc<PeerAnnouncement>>,
    metadata: SwarmMetadata,
    event_sender: Sender,
}

To:

#[derive(Clone)]
pub struct Swarm {
    data: SwarmData,
    event_sender: Sender,
}

#[derive(Clone, Debug, Display, Hash, PartialEq, Eq)]
pub struct SwarmData {
    info_hash: InfoHash,
    peers: BTreeMap<SocketAddr, Arc<PeerAnnouncement>>,
    metadata: SwarmMetadata,
}

…y pacakge

All features are now covered by unit tests.
@josecelano josecelano added the Testing Checking Torrust label May 16, 2025
@josecelano josecelano self-assigned this May 16, 2025
@josecelano
Copy link
Member Author

ACK 1472c8e

@josecelano josecelano marked this pull request as ready for review May 16, 2025 12:21
@josecelano josecelano requested a review from da2ce7 May 16, 2025 12:23
Copy link

codecov bot commented May 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.27%. Comparing base (66bf0cc) to head (1472c8e).
Report is 4 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1520      +/-   ##
===========================================
- Coverage    84.35%   84.27%   -0.08%     
===========================================
  Files          265      265              
  Lines        18933    18915      -18     
  Branches     18933    18915      -18     
===========================================
- Hits         15970    15941      -29     
- Misses        2683     2692       +9     
- Partials       280      282       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@josecelano josecelano merged commit 6735018 into torrust:develop May 16, 2025
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing Checking Torrust
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Overhaul stats: remove integration tests from torrent-repository package
1 participant