Skip to content

refactor: Make mock fetcher generally available#1455

Merged
qweeah merged 1 commit into
oras-project:mainfrom
TerryHowe:mock-fetcher
Aug 4, 2024
Merged

refactor: Make mock fetcher generally available#1455
qweeah merged 1 commit into
oras-project:mainfrom
TerryHowe:mock-fetcher

Conversation

@TerryHowe

Copy link
Copy Markdown
Member

What this PR does / why we need it:

I wanted to get a feel for how people felt about making a mock fetcher as a test utility, so I created this small PR.

@codecov

codecov Bot commented Jul 24, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 84.61538% with 6 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@82949a2). Learn more about missing BASE report.

Files Patch % Lines
internal/testutils/fetcher.go 84.61% 3 Missing and 3 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1455   +/-   ##
=======================================
  Coverage        ?   83.29%           
=======================================
  Files           ?      110           
  Lines           ?     3892           
  Branches        ?        0           
=======================================
  Hits            ?     3242           
  Misses          ?      426           
  Partials        ?      224           

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

Comment thread internal/testutils/fetcher.go
Comment thread internal/testutils/fetcher.go

@qweeah qweeah 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.

Well, I got to confess mocking a fetcher is torturesome so the test code is bad. Thanks for making it better (but you haven't met the mocked registry service yet :) )

Comment thread internal/testutils/fetcher.go
@TerryHowe TerryHowe force-pushed the mock-fetcher branch 2 times, most recently from bf0dff3 to f35a8a9 Compare July 28, 2024 12:11
Signed-off-by: Terry Howe <terrylhowe@gmail.com>

@qweeah qweeah 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.

LGTM

@qweeah qweeah merged commit 25b8d59 into oras-project:main Aug 4, 2024
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