Skip to content

Replace live gcs fetch test with mocked - #1753

Merged
rfbgo merged 1 commit into
Ramble-Project:developfrom
rfbgo:mock_gs
Sep 4, 2026
Merged

Replace live gcs fetch test with mocked#1753
rfbgo merged 1 commit into
Ramble-Project:developfrom
rfbgo:mock_gs

Conversation

@rfbgo

@rfbgo rfbgo commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Previously we were hitting a live end point out of our control (gs://hpc-toolkit-demos/build_cache/index.json), which means our unit tests required internet. This addresses those 2 issues

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request refactors the GCS fetch strategy tests by replacing the network-dependent test with a mocked implementation using custom mock classes (MockBlob, MockBucket, and MockGcsClient). Additionally, it introduces a new test, test_gcsfetchstrategy_content_type_mismatch, to ensure a warning is issued when there is a content type mismatch. There are no review comments, so I have no feedback to provide.

@ramble-pr-bot

ramble-pr-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

Ramble Performance Test Metrics

Results produced with commit: 580d1b3

Test Name Outcome Duration (s) Most Recent Run (s) Last 5 Avg (s)
test_analyze_large_file passed 2.0646 2.0856 (b311f41) 2.0701
test_large_template_expansion passed 1.1958 1.2188 (b311f41) 1.1978
test_many_experiments passed 24.1248 25.3640 (b311f41) 24.4371
test_many_objects_defaults passed 13.1091 13.6953 (b311f41) 12.7329
test_matrix_filter_perf passed 1.1221 1.1669 (b311f41) 1.1093

@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.42857% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.09%. Comparing base (b311f41) to head (580d1b3).

Files with missing lines Patch % Lines
lib/ramble/ramble/test/gcs_fetch.py 96.42% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1753      +/-   ##
===========================================
+ Coverage    94.07%   94.09%   +0.01%     
===========================================
  Files          370      370              
  Lines        37424    37463      +39     
===========================================
+ Hits         35207    35251      +44     
+ Misses        2217     2212       -5     

☔ View full report in Codecov by Harness.
📢 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.

@rfbgo
rfbgo requested a review from linsword13 September 1, 2026 12:28
@rfbgo

rfbgo commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator Author

@dcoapp recheck

@rfbgo rfbgo left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@dcoapp recheck

Signed-off-by: Bob <robertbird@google.com>
@rfbgo
rfbgo merged commit 368eeea into Ramble-Project:develop Sep 4, 2026
22 checks passed
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