Skip to content

refactor(test): net test mocking#248

Merged
hugoh merged 1 commit into
mainfrom
mock
May 25, 2026
Merged

refactor(test): net test mocking#248
hugoh merged 1 commit into
mainfrom
mock

Conversation

@hugoh
Copy link
Copy Markdown
Owner

@hugoh hugoh commented May 25, 2026

No description provided.

@deepsource-io
Copy link
Copy Markdown

deepsource-io Bot commented May 25, 2026

DeepSource Code Review

We reviewed changes in 2bdedfa...51de7e9 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
Go May 25, 2026 10:36p.m. Review ↗
Secrets May 25, 2026 10:36p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

Comment thread internal/check/probe_tcp_test.go Outdated

return
}
func (a *fakeTCPAddr) Network() string { return "tcp" }
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Method receiver 'a' is not referenced in method's body, consider removing it


Methods with unused receivers can be a symptom of unfinished refactoring or a bug. To keep
the same method signature, omit the receiver name or '_' as it is unused.

Comment thread internal/check/probe_tcp_test.go Outdated

return
}
func (_ *fakeTCPAddr) Network() string { return "tcp" }
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Unused method receiver '_', consider removing it


Methods with unused receivers can be a symptom of unfinished refactoring or a bug. To keep
the same method signature, omit the receiver name or '_' as it is unused.

Comment thread internal/check/probe_tcp_test.go Outdated

return
}
func (_ *fakeTCPAddr) Network() string { return "tcp" }
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

receiver name should not be an underscore, omit the name if it is unused


The name of a method's receiver should be a reflection of its
identity; often a one or two letter abbreviation of its type
suffices (such as "c" or "cl" for "Client").

@sonarqubecloud
Copy link
Copy Markdown

@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

❌ Patch coverage is 39.13043% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.56%. Comparing base (2bdedfa) to head (51de7e9).

Files with missing lines Patch % Lines
internal/check/probe_dns.go 11.11% 7 Missing and 1 partial ⚠️
internal/check/probe_tcp.go 60.00% 3 Missing and 1 partial ⚠️
internal/check/probe_http.go 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #248      +/-   ##
==========================================
- Coverage   89.10%   86.56%   -2.54%     
==========================================
  Files          17       17              
  Lines         725      737      +12     
==========================================
- Hits          646      638       -8     
- Misses         51       68      +17     
- Partials       28       31       +3     

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

@hugoh hugoh merged commit 1946fcf into main May 25, 2026
7 of 9 checks passed
@hugoh hugoh deleted the mock branch May 25, 2026 22:38
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.

1 participant