Skip to content

Move tests to aws-smithy-mocks#119

Open
simonmarty wants to merge 18 commits intoaws:mainfrom
simonmarty:smithy-mocks
Open

Move tests to aws-smithy-mocks#119
simonmarty wants to merge 18 commits intoaws:mainfrom
simonmarty:smithy-mocks

Conversation

@simonmarty
Copy link
Copy Markdown
Contributor

Issue #, if available:

Description of changes: Accidentally closed #112 on a force push.

Move unit tests to aws-smithy-mocks for easier test coverage.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@simonmarty simonmarty requested a review from a team as a code owner September 22, 2025 15:33
@codecov
Copy link
Copy Markdown

codecov bot commented Sep 22, 2025

Codecov Report

❌ Patch coverage is 97.55556% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.53%. Comparing base (219cb8e) to head (6fdf9bb).

Files with missing lines Patch % Lines
aws_secretsmanager_caching/src/lib.rs 97.55% 9 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #119      +/-   ##
==========================================
+ Coverage   92.30%   92.53%   +0.22%     
==========================================
  Files          15       15              
  Lines        2626     2826     +200     
  Branches     2626     2826     +200     
==========================================
+ Hits         2424     2615     +191     
- Misses        152      160       +8     
- Partials       50       51       +1     

☔ 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.

@simonmarty simonmarty force-pushed the main branch 2 times, most recently from de875e6 to cde666a Compare October 25, 2025 00:58
@reyhankoyun reyhankoyun added the safe-to-test Maintainer approval to run integration tests for external contributor PRs. label Nov 25, 2025
@github-actions github-actions bot removed the safe-to-test Maintainer approval to run integration tests for external contributor PRs. label Nov 25, 2025
@simonmarty simonmarty added the safe-to-test Maintainer approval to run integration tests for external contributor PRs. label Apr 2, 2026
@github-actions github-actions bot removed the safe-to-test Maintainer approval to run integration tests for external contributor PRs. label Apr 2, 2026
Comment thread aws_secretsmanager_caching/src/lib.rs Outdated
Comment thread aws_secretsmanager_caching/src/lib.rs Outdated
Comment thread aws_secretsmanager_caching/src/lib.rs Outdated
#[tokio::test]
async fn test_is_current_default_succeeds() {
let client = fake_client(Some(Duration::from_secs(0)), false, None, None);
async fn test_get_cache_is_current_fast_refreshes() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The is_current tests (test_get_cache_is_current_fast_refreshes, test_is_current_version_id_succeeds, test_is_current_version_stage_succeeds, test_is_current_both_version_id_and_version_stage_succeed) share ~90% identical setup: same GSV mock, same describe mock, same client construction, same assertion loop. A helper that takes optional version_id/version_stage and returns a configured client + mock rules would cut a lot of duplication. The old code had fake_client() for this, looks like we removed it for mock-based tests but didn't replace it.

Copy link
Copy Markdown
Contributor Author

@simonmarty simonmarty Apr 17, 2026

Choose a reason for hiding this comment

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

Refactored using an LLM in 98f9306, still proofreading the work. Found a miss in 6fdf9bb

@reyhankoyun reyhankoyun added the safe-to-test Maintainer approval to run integration tests for external contributor PRs. label Apr 6, 2026
@github-actions github-actions bot removed the safe-to-test Maintainer approval to run integration tests for external contributor PRs. label Apr 6, 2026
@simonmarty simonmarty added the safe-to-test Maintainer approval to run integration tests for external contributor PRs. label Apr 18, 2026
@github-actions github-actions bot removed the safe-to-test Maintainer approval to run integration tests for external contributor PRs. label Apr 18, 2026
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