Skip to content

Conversation

aofei
Copy link
Member

@aofei aofei commented Mar 3, 2025

No description provided.

@aofei aofei requested a review from Copilot March 3, 2025 00:32
Copy link

codecov bot commented Mar 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.87%. Comparing base (efa2ced) to head (95d71d8).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #110   +/-   ##
=======================================
  Coverage   80.87%   80.87%           
=======================================
  Files          11       11           
  Lines        1370     1370           
=======================================
  Hits         1108     1108           
  Misses        255      255           
  Partials        7        7           

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

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

PR Overview

This PR reorganizes the tests to use subtests (via t.Run) for improved clarity and isolation, while also adjusting error reporting from fatal assertions to non‐fatal ones in several test cases. Key changes include:

  • Wrapping individual test cases in t.Run with subtest names.
  • Changing several call sites from t.Fatal/t.Fatalf to t.Error/t.Errorf.
  • Minor adjustments in error message formatting across multiple test files.

Reviewed Changes

File Description
goproxy_test.go Refactored tests to use subtests and modified error reporting.
cacher_test.go Introduced subtests and adjusted error handling in caching tests.
http_test.go Updated subtests and structured error expectations in HTTP tests.
sumdb_client_ops_test.go Switched to subtests and lambda-based configurations for clarity.
response_test.go Wrapped response tests in subtests with simplified error messages.

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

goproxy_test.go:182

  • [nitpick] Using numeric identifiers as subtest names may not be sufficiently descriptive for test reports. Consider providing more meaningful subtest names to improve clarity.
t.Run(strconv.Itoa(tt.n), func(t *testing.T) {

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
@aofei aofei enabled auto-merge (squash) March 3, 2025 05:04
@aofei aofei disabled auto-merge March 3, 2025 05:11
@aofei aofei merged commit 5b2a4c8 into goproxy:master Mar 3, 2025
8 checks passed
@aofei aofei deleted the test branch March 3, 2025 05:11
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