Skip to content
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

Simplify exists_on_server tests #4355

Merged
merged 3 commits into from
Dec 3, 2024

Conversation

andybalaam
Copy link
Member

This is part of element-hq/element-meta#2638

I am planning to add a fast_exists_on_server method which uses a locally-cached value. This change makes the tests ready so I can re-use parts of them in my tests for the new method.

@andybalaam andybalaam requested a review from a team as a code owner November 29, 2024 13:47
@andybalaam andybalaam requested review from poljar and removed request for a team November 29, 2024 13:47
@@ -1282,4 +1254,60 @@ mod test {

server.verify().await;
}

async fn mock_backup_exists(server: &MockServer) -> MockGuard {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should become part of the MatrixMockServer.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 0d7bbb4

Copy link

codecov bot commented Nov 29, 2024

Codecov Report

Attention: Patch coverage is 58.62069% with 12 lines in your changes missing coverage. Please review.

Project coverage is 85.11%. Comparing base (e76b8f7) to head (944a1ba).
Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
crates/matrix-sdk/src/test_utils/mocks.rs 58.62% 12 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4355      +/-   ##
==========================================
- Coverage   85.14%   85.11%   -0.04%     
==========================================
  Files         280      280              
  Lines       30764    30793      +29     
==========================================
+ Hits        26193    26208      +15     
- Misses       4571     4585      +14     

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

@andybalaam andybalaam requested a review from poljar December 3, 2024 13:33
Copy link
Contributor

@poljar poljar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, the tests look much nicer now.

@andybalaam andybalaam force-pushed the andybalaam/refactor-exists-on-server-tests branch from 6f1588f to 944a1ba Compare December 3, 2024 14:41
@andybalaam andybalaam enabled auto-merge (rebase) December 3, 2024 14:41
@andybalaam andybalaam merged commit 9002f82 into main Dec 3, 2024
39 checks passed
@andybalaam andybalaam deleted the andybalaam/refactor-exists-on-server-tests branch December 3, 2024 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants